This support forum is no longer in use. Please use the Cloudinary Community at to receive assistance from other members of the community and from Cloudinary's support team. For account-specific questions or if you believe that you've encountered a bug, please contact the Cloudinary team directly via the "submit a request" option on this support site.

G_AUTO automatically added - TURN OFF


1 comment

  • Avatar
    Loic Verger Del Bove

    Hi Nemanja,

    Thanks for reaching out.

    This is automatic when adding width and height to your image element. You can modify it by adding this piece of code to your functions.php

    * Granular control on Cloudinary crops.
    * @param array|string $size The size array or slug.
    * @param int $attachment_id The attachment ID.
    * @return array|string
    function ( $size, $attachment_id ) {
    if (
    is_array( $size ) &&
    // Check more about WordPress conditionals here
    is_post_type_archive( 'product' ) ||
    // Check more specific WooCommerce conditionals here
    is_woocommerce() ||
    // Check specific requested image sizes.
    'woocommerce_thumbnail' === $size['wpsize']
    ) {
    $size['crop'] = 'scale';
    unset( $size['gravity'] );

    return $size;

    This code is for WooCommerce, so you might need to add a condition depending on how your images are added

    Hope that helps.



    Comment actions Permalink

Post is closed for comments.