-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there any reason you don't add a height attribute to fallback image? #78
Comments
I think the reason for this was that the height value will be incorrect in most cases. By definition, the different sources of a picture tag will have different aspect ratios, so there can‘t be a correct height. It can be argued that I should just choose the height of one variant or the one of the fallback image, but I‘m not sure what to choose here. Apart from that it would probably be a breaking change... There probably will be a solution to that problem in the HTML5 specification: |
Btw. the viewhelper is broken when you use an image that doesn't have a width in sys_file_metadata (which can be the case when you're trying to use a file that isn't in your file storage but a static resource from your /Resources/Public/Images folder..) |
Could you give me a concrete example? This worked for me: <sms:image
src="EXT:sms_responsive_images/Documentation/Images/AdministratorManual/ConstantsEditor.png"
srcset="200, 400, 600"
width="400"
/> |
sms-responsive-images/Classes/Utility/ResponsiveImagesUtility.php
Line 221 in 1a559c1
You could also do
$fallbackTag->addAttribute('height', $fallbackImage->getProperty('height'));
like it's done in f:media. Or am I missing something?
The text was updated successfully, but these errors were encountered: