Strange image sizing issue

This topic contains 8 replies, has 2 voices, and was last updated by wowmatt wowmatt 5 years, 7 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #18902
    wowmatt
    wowmatt
    Participant

    Hi,

    There seems to be a strange image sizing issue with my related posts blocks on my pages.

    For example if you look a this page:
    https://www.ukairdates.com/tv-show/better-call-saul/

    And look a the related posts its loading the full sized images and just resizing them, which means it loads them really slowly as they are large images, even though in settings I have set it up to crop the images.

    However, sometimes when I load a page it does do it and they are cropped all the same size and load much faster. Why is this? Why does it seem random if it loads them or not?

    What would be really good is if you could configure it to use one of wordpress sized images that are automatically generated our theme creates multiple sized images automatically when we upload an image so it would be good to be able to just pick one of these sizes. However as this isn’t possible at present the cropping feature is OK but it doesn’t seem to always load?

    Thanks

    #18906
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    That is strange, my guess is that when the cache was re-created, and the cropping was disabled, then the plugin cache + the page cache may have memorized the uncropped versions.
    The only thing that should limit the cropping is, if the image is smaller than the cropping size (I don’t think that is your case), or if there is no permission to write the files – however that is fine as well, since there were files cropped.

    Can you pelase try the following:
    – Make sure that the image cropping option is enabled on all related posts pro instances you have: https://i.imgur.com/QEt1Srv.png
    – Also, turn off the related posts pro cache: https://i.imgur.com/lANvUtC.png
    – Then clear all site/cloudflare caches, and reload the pages via CTRL + F5 buttons

    This will prevent the ‘double’ caching, as the wp rocket cache is sufficient to handle that. If this was the issue, then the images should start appearing as the cropped versions.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #18912
    wowmatt
    wowmatt
    Participant

    Hi Ernest,

    Hmm strange still not seeing the cropped versions. I followed all your steps including disabled the related posts pro cache as this was on, but it still seems to be loading the full sized images. As you mentioned they are bigger than the cropping size by quite a lot.

    Do you have any other ideas?

    Thanks

    #18916
    wowmatt
    wowmatt
    Participant

    Hi

    Just following up on my last message I have since realised its 100% to do with WP Rocket.

    As I have realised it does show the cropped images when I am logged in and then the cache is disabled. When not logged in it shows full sized images as cache is enabled.

    #18919
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    I am guessing, that WP Rocket is moving the image URLs to a cdn subdomain, and it is probably conflicting with the cropping in some way. Maybe the server does not have privileges to parse contents from subdomain URLs or something like that.

    Anyways, I think the best option here is to simply use a custom code to try to replace the images with the thumbnail versions. Add this custom code to the functions.php in your theme/child theme directory (copy from line 3 only!). Before editing, please make sure to have a full site back-up just in case!

    This should do the trick.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #18921
    wowmatt
    wowmatt
    Participant

    Hi Ernest,

    Well it is showing a smaller image now but its loading them now as squares instead when really we need them to be rectangle, see attached screenshots of how its showing them now.

    I think the width is fine just need to set them to have less height. Is there a way to pick a specific size that wordpress has generated instead of thumbnail?

    Attachments:
    You must be logged in to view attached files.
    #18954
    wowmatt
    wowmatt
    Participant

    Hi

    Just following up on this to see how you are getting on with solving this?

    Thanks.

    #18957
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Maybe the thumbnail size is too small, so it is stretched horizontally. Perhaps a bigger size, ‘medium’ will be the solution:

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #18972
    wowmatt
    wowmatt
    Participant

    Great seems to be working ok now 🙂

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

The forum ‘Related Posts Pro for WordPress Support’ is closed to new topics and replies.