Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2150

[3.3.x] Support Forum • PageSpeed Insights and width/height problems.

$
0
0
Is there any good way to add height and width attributes to the attachments?
PageSpeed Insights says "To reduce overall layout drift and avoid issues with element misalignment, we recommend that you always explicitly set the width and height for images"

The code for an attachment in my case looks like this:
<a href="/pic/147108.jpg" class="fancybox" data-fancybox="gallery">
<img src="/thumb/147108.jpg" loading="lazy" class="postimage" alt="***" title="***"></a>

And the only option when Google is satisfied is when we have the code like this:
<a href="/pic/147108.jpg" class="fancybox" data-fancybox="gallery">
<img src="/thumb/147108.jpg" loading="lazy" class="postimage" alt="***" title="***" height="200" width="200"></a>
But of coure the proportion becomes the problem... How to deal with that? To forget about PageSpeed Insights is not the way. )

Statistics: Posted by romeo_piter — Fri Feb 16, 2024 10:12 pm



Viewing all articles
Browse latest Browse all 2150

Trending Articles