Images are not using all available height

  • Author
    Posts
  • #57914

    I’m using version 1.1.3 and have issue with featured images on the landing page. Image height is 300 pixels in height but now only a portion of it 176 px are displayed. I tried updating them, nothing helped. The image height is not set as exepcted.
    I found the issue can be removed when I remove the srcset/sizes attributes from node

    <a class="responsive-featured-image" href="http://domain.com/page/" title="Title">
    	<img class="post-featured-image" alt="Title" itemprop="url" src="http://domain.com/wp-content/uploads/2018/01/A_IMG_2891-800x300.jpg" srcset="http://domain.com/wp-content/uploads/2018/01/A_IMG_2891-516x300.jpg 516w, http://domain.com/wp-content/uploads/2018/01/A_IMG_2891-1320x300.jpg 1320w, http://domain.com/wp-content/uploads/2018/01/A_IMG_2891-800x300.jpg 800w, http://domain.com/wp-content/uploads/2018/01/A_IMG_2891-512x300.jpg 512w" sizes="(max-width: 800px) 100vw,(max-width: 1152px) 50vw, 311px">
    </a>

    So when I leave this

    <a class="responsive-featured-image" href="http://domain.com/page/" title="Title">
    	<img class="post-featured-image" alt="Title" itemprop="url" src="http://domain.com/wp-content/uploads/2018/01/A_IMG_2891-800x300.jpg">
    </a>

    all works as expected. As I understand I will use the fix with the next update, so is there another workaround/fix i could use instead of this?

    Now I see two issues. When the site width becomes 1150px the featureg image gets ugly white boxes on the left/right side. The height issue can be also resolved by removing wmage with “1320w” from the srcset. Can any of this be fixed?

    • This topic was modified 6 years ago by krisb.
    #58393
    Zed
    Cryout Creations mastermind

    @krisb, the current srcset implementation does not cover all usage scenarios (and is improperly handled by Chrome in some cases). We’ll be improving it in a future theme update.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #58408

    That will be nice. Thanks

    #59993
    Zed
    Cryout Creations mastermind

    Let us know how the 1.2.0 update works for your site concerning featured images.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #60075

    @Zed: Seems like you fixed it! Nice work. Thanks.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Images are not using all available height’ is closed to new replies.