[✨]Extend the breakpoints of built-in responsive images by 1920, 3840 and prefere avif against webp #276
Replies: 8 comments
-
One problem is that not all browsers support avif. Ideally there's several formats and the server returns the image that corresponds with the |
Beta Was this translation helpful? Give feedback.
-
I mean something like this:
|
Beta Was this translation helpful? Give feedback.
-
can you combine that with responsive sizes where the browser decides which resolution to get? I think picture lets you decide but not the browser. |
Beta Was this translation helpful? Give feedback.
-
I use this at the moment and tested it. Firefox and Chrome uses avif, Edge uses webp.
< source srcset=" < MainPic id="main_pic" class="relative w-full lg:object-none lg:h-[637px] md:mb-[170px] bottom-[2.375rem] md:bottom-0 lg:top-[-45px] xl:top-[0] left-0 right-0 mb-[0.938rem] lg:mb-[0.938rem] mh800:lg:h-[calc(100%-73px)] xl:h-[calc(100%-73px)]" alt="Wald mit See" loading="eager" /> Sry, but the code format does not let me post picture and source as code. |
Beta Was this translation helpful? Give feedback.
-
Although it works, the vite console throws this error because of the avif files: After build and deploy, this error is gone so I think it is a vite problem. |
Beta Was this translation helpful? Give feedback.
-
vite supports avif files but qwik's optimizer can not identify the format because the file signature (magic bytes) for avif files is missing. |
Beta Was this translation helpful? Give feedback.
-
We moved this issue to |
Beta Was this translation helpful? Give feedback.
-
this functionality is implemented by vite-imagetools and in the meantime it got updated a few times, I expect. Is this still a problem? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem?
No.
Describe the solution you'd like
Add the both breakpoints or let us override the breakpoints like qwik-image it does (resolutions: [...]).
Firefox and Chrome uses webp but they can use also avif, so avif should be prefered.
This feature would help especially at full viewport witdh pictures.
To be clear I mean the image optimization that relies on the vite-imagetools.
Describe alternatives you've considered
S. o.
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions