Opened 6 months ago

#7401 new defect (bug)

Portrait oriented images are pixelated on directory listing pages

Reported by: desrosj's profile desrosj Owned by:
Milestone: Priority: normal
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"
srcset=", 2x"
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."

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.

Change History (0)

Note: See TracTickets for help on using tickets.