-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom sized images using thumbnail images for srcset #216
Comments
@TedAvery - Thanks for reporting the issue. @joemcgill - This is a probably a regression from c3057fb. |
I was just looking at the code of |
Hi @TedAvery. Thanks for reporting the issue. Can you tell us what version of the RICG plugin you currently have installed and paste the HTML of one of the affected images as it appears in the content editor? |
@joemcgill Version 2.5.2. Example code below. Thanks!
|
Thanks @TedAvery. One more favor—can you tell me what custom image sizes are available in your install and if they're hard or soft crops? |
Since I've encountered a similar issue yesterday with custom responsive image code (functionally equivalent, but genealogically unrelated to the plugin), is that 600 x 600 image by any chance the actual There is no possible fix (except using a custom function that does not treat Addendum: I've filed a ticket on Trac, so you might want to chime in there. Edit: Clarified a sentence. |
I noticed the exception for the image size with the name "thumbnail" in the ratio check and I agree that this is odd. I have no idea why this exception was made, but maybe there is a good reason for it. By default the thumbnail size is 150x150 but maybe @TedAvery changed it to 600x600 with |
I think the exception is purely historical, as once upon a time there were only the thumbnail and the full image. Since WP on its own does not (re-)generate missing image sizes, the thumbnail was used as a last resort. |
@joemcgill Sorry for the delay. Stupid question, but how do I get the info you're requesting? I do know that the theme I am using requires you to run the "Force regenerate thumbnails" plugin when you first run it in order to ensure your images are compatible with the theme. So your suspicions about custom image sizes is most likely correct. For now, on the example post I mentioned, we've removed the custom sizing entirely, just linking to "Medium" size images which doesn't seem to have the cropping issue. |
@TedAvery You can look for Addendum: Maybe easier to check: |
@mundschenk-at Thanks. I found a few options for add_image_size( 'cb-100-65', 100, 65, true ); // Widgets
add_image_size( 'cb-260-170', 260, 170, true ); // Megamenu
add_image_size( 'cb-360-490', 360, 490, true ); // Portrait thumbnails
add_image_size( 'cb-360-240', 360, 240, true ); // Blog Style A/Mega menu
add_image_size( 'cb-378-300', 378, 300, true ); // Slider C, Grid small thumbnails
add_image_size( 'cb-759-300', 759, 300, true ); // Grid Medium thumbnails, Grid 3 Static Big Thumbnail
add_image_size( 'cb-759-500', 759, 500, true ); // Slider B, Standard featured image, Blog Style D/F/G, Module D
add_image_size( 'cb-759-600', 759, 600, true ); // Grid big thumbnails
add_image_size( 'cb-1400-600', 1400, 600, true ); // Parallax/Full screen/Full screen slider |
@TedAvery Those are custom sizes, try to look for "thumbnail". Or better, check your |
Thanks for the information. It would indeed be very helpful if you could also let us know what the dimensions of "thumbnail size", "medium size", and "large size" are on your media settings page. Thanks for your help! |
@jaspermdegroot Gah, sorry for another long silence! |
@TedAvery Do or did you ever regenerate your image variations (with a plugin like, well, Regenerate Thumbnails)? If not, the 600 x 600 image could still be an old size for Could you look in the database for the actual metadata for that particular image? PS: Did you change something on your site? The 600 x 600 image seems to be gone from the |
@mundschenk-at - Thanks for helping out here! It looks like 600x600 is the 'post-thumbnail' size indeed. Maybe @TedAvery can confirm by looking for This ticket is from before version 3.0.0 of the plugin. Since that version However, we still do call |
In a recent update to the RICG plugin (very recent, just started seeing this in the past few days), an image embedded in a post with a custom size has it's srcset populated by the thumbnail versions of an image rather than properly scaled versions of the original image.
Here's an example.
Scroll down a bit to the shoes section. The second image (yellow shoes) was embedded with custom dimensions of 220x148, and the original image is 300x162 (here). But the image displayed from the srcset is a cropped 1:1 ratio thumbnail version of the image (I'm served a 600x600 version here)
There are many more examples on this blog post when you scroll down (tops, bottoms, electronics, etc.) Previously the srcset contained only images at the same ratio as the original image.
The text was updated successfully, but these errors were encountered: