Closed jordyvandomselaar closed 4 years ago
I do not think that conversion to webP is automatic. Also, check if there is a difference in filesize for the resulting image and maybe try to tweak imagemin-mozjpeg. To get "much smaller image", the compression needs to lower image quality and JPEG optimisers generally have conservative default setting.
@durchanek that makes sense. Thanks! Do you know of a way to turn webp on for all images without having to append ?webp
everywhere?
@jordyvandomselaar webP is still not supported in Apple browsers, but you can use something like this: https://github.com/cyrilwanner/next-optimized-images/issues/44#issuecomment-485079916
@durchanek Thanks for the warning with Apple browsers, I did not know that. Unfortunately the proposed solution won't work with things like css background images but I'll try some other options =)
@jordyvandomselaar Yeah, it will not, but you can use Modernizr together with a SASS mixin or a JSS function.
@durchanek makes sense. I'll close this issue as I think it's a PEBCAK =) Thanks for the help!
Packages:
Build script:
Next config
When requiring an image like so:
and running
I still get the original image:
I'm expecting to get a
webm
image or at least a much smaller image but nothing seems to be happening.When adding
?lqip
to an image, I get