[wp-meta] [Making WordPress.org] #7401: Portrait oriented images are pixelated on directory listing pages
Making WordPress.org
noreply at wordpress.org
Wed Jan 10 20:04:35 UTC 2024
#7401: Portrait oriented images are pixelated on directory listing pages
-----------------------------+--------------------
Reporter: desrosj | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone:
Component: Photo Directory | Keywords:
-----------------------------+--------------------
When browsing photos in the directory, some images were standing out to me
because they appeared blurry. It seems that portrait images are receiving
an image size that's too small, but the issue only affects lower or normal
resolution displays (not high density or 2x).
As an example, here's the image tag for one of the affected images (line
returns added by me to make the tag more readable):
{{{
<img class="grid-photo"
src="https://pd.w.org/2024/01/103659ee838f017c4.47394712-225x300.jpg"
srcset="https://pd.w.org/2024/01/103659ee838f017c4.47394712-225x300.jpg,
https://pd.w.org/2024/01/103659ee838f017c4.47394712-768x1024.jpg 2x"
height="200"
width="300"
alt="A brown praying mantis with a green stripe on its body sitting on a
stone wall looking towards the camera. The green stripe is in focus, and
its face is slightly out of focus."
loading="lazy"
decoding="async">
}}}
Notice how the width and height are set to `300x200` in the corresponding
image tag attributes (the actual display size in the browser), but the
default and 1x sources are being sent as `225x300`. The 2x image source is
`768x1024`, which is slightly larger than required (`600x400`), so there's
no blurriness on high resolution screens.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/7401>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list