-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Added extension parameter to ImageResizer #177
Conversation
😱 Since when is this possible? I've been using JPGs for the last few years! @LukeTowers Is it still good practice to use TinyPNG to make the images smaller first? Or is webp so small that this isn't needed anymore? |
I assume a fallback to JPG is no longer needed? https://caniuse.com/webp |
This enhancement is no longer needed for me because of the new resize parameter |
This was available even before the fork. Example: <img src="{{ user.avatar.getThumb(90, 90, {'mode': 'exact', 'quality': 80, 'extension': 'webp'}) }}" width="90" height="90" alt="{{ user.name }}" /> or <img src="{{ item.foto.thumb(400, 300, {'extension': 'webp'}) }}" /> |
One more for me! Is this option related to other platform requirements? |
The only requirement is that the source image file must have the extension All parameters: https://github.com/wintercms/storm/blob/dd89dc140bfdb0e209437b2263b711b8fa655981/src/Database/Attach/File.php#L622-L629 Default values: https://github.com/wintercms/storm/blob/dd89dc140bfdb0e209437b2263b711b8fa655981/src/Database/Attach/File.php#L689-694 There is one more parameter that is not specified in the documentation. This is
In my opinion, this is something outdated for today's Internet. I don't see in the code whether there is a parameter to set an SEO-friendly name for the file. Lighthouse doesn't like the generated file names. |
I'd never realized before that this amazing feature was available!
Totally agree.
Yes, this is a serious concern for good image SEO. |
The ImageResizer's image URLs for all file types except for FileAttachements should be SEO friendly, is it not? |
Documentation page: https://wintercms.com/docs/v1.2/docs/services/image-resizing#available-parameters