wp_get_attachment_image_srcset not working
-
Hi,
When using Post Thumbnail Editor, it seems to me that the function wp_get_attachment_image() doesn’t include the generated thumbnail of that specific size anymore. Am I the only one with this issue and might I be doing something wrong? This is the code I use to generate the image:
<img src="<?php echo get_the_post_thumbnail_url('', 'thumbnail'); ?>" srcset="<?php echo wp_get_attachment_image_srcset( get_post_thumbnail_id(), ''); ?>" sizes="(max-width: 478px) 447px, (min-width: 479px) and (max-width: 767px) 353px, (max-width: 991px) 220px, (min-width: 992px) 204px" alt="">
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘wp_get_attachment_image_srcset not working’ is closed to new replies.