sheelahb
Forum Replies Created
-
Hi Jasper-
That’s right.. My theme doesn’t have a post thumbnail size set.
Never mind.. I discovered the max_srcset_image_width filter added in this release of the plugin (in the https://www.ads-software.com/support/topic/firefox-not-loading-in-larger-images-on-resize thread) so I was able to override the max image width default of 1600px.
I’ve now been able to reproduce my img with srcset and sizes set as they were in the previous release, using the_post_thumbnail(size) and the max_srcset_image_width filter.
Hi Joe-
Thanks for looking into this. That does seem to work. Using the_post_thumbnail(‘full’) returns the img tag with srcset and sizes attributes. However, I am wondering why it’s not including the original size image (full) in the srcset though as it did in the previous plugin version. It’s setting it only in the src attribute, but without it in srcset it’s never actually available for use.
Now I get:
<img width=”2048″ height=”1316″ src=”https://local.dev/wp-content/uploads/2015/11/flower.jpg” class=”attachment-full wp-post-image” alt=”flower” srcset=”https://local.dev/wp-content/uploads/2015/11/flower-300×193.jpg 300w, https://local.dev/wp-content/uploads/2015/11/flower-1024×658.jpg 1024w, https://local.dev/wp-content/uploads/2015/11/flower-1450×932.jpg 1450w” sizes=”(max-width: 2048px) 100vw, 2048px” />Last version of the plugin returned this when my template used the_post_thumbnail():
<img width=”2048″ height=”1316″ src=”https://local.dev/wp-content/uploads/2015/11/flower.jpg” class=”attachment-post-thumbnail wp-post-image” alt=”flower” srcset=”https://local.dev/wp-content/uploads/2015/11/flower-300×193.jpg 300w, https://local.dev/wp-content/uploads/2015/11/flower-1024×658.jpg 1024w, https://local.dev/wp-content/uploads/2015/11/flower-1450×932.jpg 1450w, https://local.dev/wp-content/uploads/2015/11/flower.jpg 2048w” sizes=”(max-width: 2048px) 100vw, 2048px” />I tried dequeuing Picturefill and using the previous version of it (2.3.1) but got the same result.
Hi Joe-
No, there are no hard crop sizes set for my theme.
It does work as it did in the previous version (generating srcset and sizes) if I remove the call to the_post_thumbnail() and use this instead, but it’s a lot more code:
if ( has_post_thumbnail() ) {
$args = array(
‘sizes’ => array(
array(
‘size_value’ => ‘100vw’
),
)
);$post_thumb = get_post_thumbnail_id( get_the_ID() );
$sizes = tevkori_get_sizes( $post_thumb, ‘medium’, $args );
echo wp_get_attachment_image( $post_thumb, ‘medium’, false, array(‘sizes’ => $sizes, ‘class’ =>’attachment-post-thumbnail’) );Thanks for any other ideas.
Forum: Plugins
In reply to: [RICG Responsive Images] Width and Height interfering with sizes attributeOk – thanks, Joe. I was surprised that the height and width attributes on the image tag are left there with this plugin in place since they can interfere and cause unexpected behavior, but at least there are workarounds ??
Forum: Plugins
In reply to: [RICG Responsive Images] Not creating multiple image sizes for PNGGot this to work, so confirmed it’s not a bug with this plugin. For the record, it was a PHP config issue, fixed by reinstalling and reconfiguring PHP. I followed answer #2 on https://stackoverflow.com/questions/26443242/after-upgrade-php-no-longer-supports-png-operations.
Forum: Plugins
In reply to: [RICG Responsive Images] Not creating multiple image sizes for PNGAnd yes, I still see the issue when I disable the plugin.
Forum: Plugins
In reply to: [RICG Responsive Images] Not creating multiple image sizes for PNGYes, I did turn on the advanced compression setting. I tried disabling it though and I still don’t get the different image sizes created for PNGs on my mac.
Forum: Plugins
In reply to: [RICG Responsive Images] Not creating multiple image sizes for PNGUpdate: creation of multiple image sizes for PNGs works fine on my other machine (linux) so I think there must be some kind of PHP config issue on my Macbook Pro.