Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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);
    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?

Viewing 2 replies - 1 through 2 (of 2 total)