You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I'm a newbie to responsive images in general and I'm having some trouble understanding how I can improve the lighthouse score for the Performance/Cumulative Layout Shift (CLS) section.
With the following code, I get a lighthouse score of 84 due to CLS:
<InnerImageZoom
v-if="post.public_id"
:src="`https://res.cloudinary.com/${$config.cloudinary.cloudName}/f_auto,q_60,w_900/${post.public_id}`"
:zoom-src="`https://res.cloudinary.com/${$config.cloudinary.cloudName}/c_scale,w_2000,q_auto:best,f_auto/${post.public_id}`"
:width="post.width" <---- original width of image is: 3096
:height="post.height" <---- original height of image is: 2591
:has-spacer="true"
:alt="post.title"
:hide-hint="true"
:src-set="'https://res.cloudinary.com/XXXX/image/upload/f_auto,q_60,w_510/v1640005494/users/ezcOtHHWVrYLZoPvVOCumfubSUa2/uploads/XXXX.jpg 510w,https://res.cloudinary.com/XXXX/image/upload/f_auto,q_60,w_607/v1640005494/users/ezcOtHHWVrYLZoPvVOCumfubSUa2/uploads/XXXX.jpg 607w,https://res.cloudinary.com/XXXX/image/upload/f_auto,q_60,w_689/v1640005494/users/ezcOtHHWVrYLZoPvVOCumfubSUa2/uploads/XXXX.jpg 689w,https://res.cloudinary.com/XXXX/image/upload/f_auto,q_60,w_769/v1640005494/users/ezcOtHHWVrYLZoPvVOCumfubSUa2/uploads/XXXX.jpg 769w,https://res.cloudinary.com/XXXX/image/upload/f_auto,q_60,w_841/v1640005494/users/ezcOtHHWVrYLZoPvVOCumfubSUa2/uploads/XXXX.jpg 841w,https://res.cloudinary.com/XXXX/image/upload/f_auto,q_60,w_900/v1640005494/users/ezcOtHHWVrYLZoPvVOCumfubSUa2/uploads/XXXX.jpg 900w'"
/>
Whereas, with the following code like so, I get a score of 100:
Does anyone have any tips on how I can improve the CLS score when using the vue inner image zoom library in Vue2 (I am actually using NuxtJS, but that should be the same)?
Thanks!
The text was updated successfully, but these errors were encountered:
When you set width, height, and hasSpacer, it should insert a wrapper around your image with padding-bottom set to save the space that your image will load into. If you inspect the original image are you seeing that div? If not I'll have to look into whether using it in combination with Nuxt is causing unexpected issues.
Hi, loving this plugin.
However, I'm a newbie to responsive images in general and I'm having some trouble understanding how I can improve the lighthouse score for the Performance/Cumulative Layout Shift (CLS) section.
With the following code, I get a lighthouse score of
84
due to CLS:Whereas, with the following code like so, I get a score of
100
:Does anyone have any tips on how I can improve the CLS score when using the vue inner image zoom library in Vue2 (I am actually using NuxtJS, but that should be the same)?
Thanks!
The text was updated successfully, but these errors were encountered: