Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1407659

    Hello,
    I want to change my woocommerce thumbnails so they crop the thumbnails from the top, center instead of from the middle of the image. I added code to my functions.php file in my child theme.
    add_filter( ‘woocommerce_get_image_size_gallery_thumbnail’, ‘enfold_child_set_gallery_thumbnail_crop’ );

    function enfold_child_set_gallery_thumbnail_crop( $size ) {
    $size = array(
    ‘width’ => 450,
    ‘height’ => 450,
    ‘crop’ => array( ‘center’, ‘top’ ),
    );
    return $size;
    }
    I then regenerated the thumbnails through woocommerce. It works on my personal computer, I can see the results I intended. However it does not show up on my Ipad, my phone, and no one else I show the site to is seeing it. We aren’t using a caching plugin. Tried waiting over night, and it didn’t work the next day either. They’ve tried shift reloading as well, it’s not showing for them either. I’ve also tried regenerating the thumbnails with a regenerate thumbnails plugin. Is there a step I am missing, or a conflict that would prevent that from working properly? I can’t figure out why I can see it but no one else can.

    #1407665

    Hi epkdesign,

    Try to go to Enfold > Performance > then disable Responsive Images
    Hope it helps.

    Best regards,
    Nikko

    #1407669

    That worked, thank you so much!
    What does turning off responsive images mean for uploading images in the future, for the rest of the site? I tried looking it up in the docs and googling it in general and wasn’t quite sure I understood the setting. The site still looks ok on mobile, but I want to make sure this fix isn’t going to be causing long term problems.

    #1407683

    Hi epkdesign,

    You’re welcome :)
    Turning on responsive images means you serve different images in multiple devices depending on the size of the screen of the device (basically the single image is cropped in multiple ways so it can be served more faster on smaller devices) however, turning it off means only a single image is served for all devices.
    Here’s further information if you want to dig deeper into it: https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images

    Best regards,
    Nikko

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.