jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Tiled Galleries: Blurry images on the carousel

Open happychait opened this issue 9 years ago • 30 comments

Images on the gallery carousel are being stretched, losing clarity and becoming blurry.

Steps to reproduce the issue

Click on a gallery image, so it opens on the carousel.

What I expected

Clear images with the same clarity as they were on the gallery.

What happened instead

Images on the gallery carousel are being stretched, losing clarity and becoming blurry.

Example sites: https://saramakdessi.com/illustrations/ https://hfxart.com/

Chats and tickets: 215297-hc 3100136-t 233958-chat 233966-chat

Possibly related to p1489076574206964-slack-triage

happychait avatar Mar 09 '17 23:03 happychait

I think I've fixed it wpcom-side with r152553-wpcom

I believe the cause of this traces back to https://github.com/Automattic/jetpack/pull/3680

georgestephanis avatar Mar 09 '17 23:03 georgestephanis

@georgestephanis

This looks like an issue with image sizes, actually:

Current img tag example with irrelevant parts stripped and original url removed:

<img
data-orig-file="img.jpg" 
data-orig-size="2048,1365"
data-medium-file="img.jpg?w=300" 
data-large-file="img.jpg?w=1000"
src="https://i1.wp.com/img.jpg?w=524&h=349&crop&ssl=1"
width="524"
height="349" 
data-original-width="524"
data-original-height="349"
itemprop="http://schema.org/image"
style="width: 162px; height: 107px;"
srcset="https://i1.wp.com/img.jpg?w=524&h=349&crop&ssl=1&zoom=2 2x"
scale="2">

All the attributes look correct except data-medium-file and data-large-file, which are lacking the height and crop information. When the size of the viewport is small enough, the image is replaced with an image that is not cropped to size, therefore looking squashed and out of proportion.

withinboredom avatar Mar 24 '17 15:03 withinboredom

@chaitanyamsv Could you confirm that this is now fixed on WordPress.com, like in your example?

jeherve avatar Mar 27 '17 14:03 jeherve

@withinboredom The missing h and crop shouldn't be a problem, as Photon should just scale to the respective width and let the height match the original ratio.

georgestephanis avatar Mar 27 '17 20:03 georgestephanis

Without the crop, here's some examples:

Without the h and crop: image

This would look distorted in a square aspect ratio.

With the h and crop: image

If you look carefully, data-medium-file and data-large-file aren't going through Photon as well.

withinboredom avatar Mar 27 '17 20:03 withinboredom

Hello all, I have no coding experience, just using the Sketch theme from Wordpress so relying on the theme to be corrected to sort this pixelated issue... Has anyone had any new revelations or can suggest another sophisticated way of showing photos in Sketch that does a similar thing without rendering my photos pixelated?

Many thanks

www.angela-dennis.com

adennisphoto avatar Apr 05 '17 10:04 adennisphoto

@adennisphoto We haven't made any progress on this just yet, but we'll update this issue when we do!

jeherve avatar Apr 06 '17 08:04 jeherve

I've got another report of the same thing:

https://michaelglancyglassworks.com/work/

This one also using the tiled gallery, but "square tiles".

321013-chat

cecoates avatar Apr 21 '17 22:04 cecoates

I (apparently) ran into this problem today; this gallery is forced to using 700px-wide images in the carousel, and as a result, the carousel images look really bad even though there is a very high-res original available:

https://ryanmarkel.com/84139/destiny-2-month-one-gallery/

Access to the site is available upon request. :)

ryanmarkel avatar Oct 02 '17 15:10 ryanmarkel

Reported in #1336286-hc as well using the Sketch theme

liviopv avatar Dec 20 '17 11:12 liviopv

I'm not sure if we have exactly the same issue, but I was able to resolve this problem for myself with the following added to my functions.php file:

// Tell Jetpack that image galleries and the content width should be considered larger (make it so images within image galleries don't get shown too small [what tiled_gallery_content_width controls] as well as making sure the sizes="(max-width:***)" doesn't pull a size smaller than desired [what jetpack_content_width controls])
function jetpack_overwrite_image_width() {
	return 1920;
}
add_filter( 'tiled_gallery_content_width', 'jetpack_overwrite_image_width' );
add_filter( 'jetpack_content_width', 'jetpack_overwrite_image_width' );

This removed the sizes code from the tag and other aspects within Jetpack's internals which had Photon serving up the incorrect size.

KZeni avatar Dec 29 '17 00:12 KZeni

A user reported this issue on their site using the Soho theme. It seems that the issue is present on these two blog posts:

(Purple flower) https://esthergeerlingsphotography.com/2017/06/27/flowers/

(Imagine picture) https://esthergeerlingsphotography.com/2016/08/02/nyc/

I'm curious that on both posts the affected image reported by the user is the first one, but it could be any image, I just can't tell whether it looks blurry or not.

Reported in: #1488255-hc Follow up ticket: #890817-zen

nellofn avatar Jan 09 '18 21:01 nellofn

Reported here Theme: Twenty Fifteen #963651-zen

vparkhere avatar Feb 20 '18 02:02 vparkhere

Another report in #1293358-zen Theme: hemingway-rewritten

joeboydston avatar Jul 22 '18 02:07 joeboydston

Also reported in #446376-hc on the theme Blask

donalirl avatar Sep 18 '18 02:09 donalirl

Also reported in #1639059-zen Theme: Canape

tijosh avatar Dec 21 '18 11:12 tijosh

Potentially related: #1723608-zen (Jetpack site) using Blaskan theme

coder-karen avatar Jan 17 '19 12:01 coder-karen

I believe Karen's ticket at #1723608-zen is indeed affected by this bug: they have the same problem even if switching to a default theme :( I suggested the user a workaround to resize and reupload the images, and let's see how it goes.

StefMattana avatar Jan 18 '19 07:01 StefMattana

Also happening in 1924944-zen on the Dara theme.

For this one, it's only happening on older images (the two most recent are showing sharp, but the earlier images show sharp initially, but then get blurry). There may be varying effects, though as some saw the opposite (reference p1554133194209400-slack-C03TY6J1A for details).

GeoJunkie avatar Apr 01 '19 19:04 GeoJunkie

User in 1924944-zen is back and saying that they don't have the blurry issue anymore.

Although they're not really sure if they had anything to do with it.

They just add one new image to the media library and to the gallery, but didn't adjust anything in the existing galleries.

erricgunawan avatar Apr 04 '19 05:04 erricgunawan