• Resolved maurog1987

    (@maurog1987)


    Hi there, I am setting up a new e-commerce with Botiga, but I noticed that GIF pictures are not animated. They are resized automatically, and are rendered as static images. Is there a way to show them animated in both the catalog and single-product view, please?

    Thanks a lot and best regards,
    Mauro

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @maurog1987,

    I guess image handling and display should be defaulted to either WooCommerce or WordPress. To verify this by yourself, you may try switching to one of default WordPress themes for testing purpose. If you have a chance to do so, please let me know any of your finding.

    Thread Starter maurog1987

    (@maurog1987)

    Ok Kharis, thanks I will try. In the meanwhile can you confirm that by default, Botiga does not prevent any GIF picture from running its animation on any pages (catalog, single product, etc.), please?

    Thread Starter maurog1987

    (@maurog1987)

    Ok I resolved, it was a wordpress/woocommerce problem most probably, I now bypass the resize this way:

    function prevent_gif_resizing($sizes, $metadata, $attachment_id) {
    $file = get_attached_file($attachment_id);

    // Check if the uploaded file is a GIF
    if ($file && pathinfo($file, PATHINFO_EXTENSION) === 'gif') {
    // Return an empty array to avoid resizing
    return [];
    }

    return $sizes;
    }
    add_filter('intermediate_image_sizes_advanced', 'prevent_gif_resizing', 10, 3);
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.