• Resolved tokkilee

    (@tokkilee)


    Hi there!

    I’m having an issue with the cropping url output – it seems like it doesn’t use WP’s standard srcset functionality, which is a big problem when loading very large images across all browser sizes. Is there a function or hack for this?

    For reference, we’re using get_the_post_thumbnail() and the non-cropped images are properly displayed as (for example):

    <img src="https://forwardsite.wpengine.com/wp-content/uploads/2021/10/mainstory.jpg" class="attachment-xlarge size-xlarge wp-post-image" alt="" loading="lazy" srcset="https://forwardsite.wpengine.com/wp-content/uploads/2021/10/mainstory.jpg 1126w, https://forwardsite.wpengine.com/wp-content/uploads/2021/10/mainstory-300x169.jpg 300w, https://forwardsite.wpengine.com/wp-content/uploads/2021/10/mainstory-1024x578.jpg 1024w, https://forwardsite.wpengine.com/wp-content/uploads/2021/10/mainstory-768x434.jpg 768w" sizes="(max-width: 1126px) 100vw, 1126px" width="1126" height="636">

    And cropped images are only showing as normal imgs:

    <img src="https://forwardsite.wpengine.com/wp-content/uploads/2021/10/sample-2400x1350.jpg" alt="" width="2400" height="1350" />

    We just don’t want load 2400px wide images to load in mobile, etc etc 🙂

    • This topic was modified 2 years, 5 months ago by tokkilee.
Viewing 1 replies (of 1 total)
  • Plugin Author Volkmar Kantor

    (@volkmar-kantor)

    Hi @tokkilee ,
    thats standard behaviour of wordpress. You may change that via a filter or action hook. Just google for “wordpress change srcset sizes”.

    The plugin do not change any of that behavior. In fact every time i uses custom image sizes i request the specific sizes directly.

Viewing 1 replies (of 1 total)
  • The topic ‘Cropped Images not using standard srcset’ is closed to new replies.