• Resolved seanpaulfx

    (@seanpaulfx)


    Is there a way to make the image exactly the set size
    I uploaded an image with dimensions (400×561) and i get the size (350×491)
    I have set up in settings as follows: 350×496
    I want to cut the correct ratio set before

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    If you want it to crop rather than scale, you can use this filter to do so:
    add_filter( ‘imsanity_crop_image’, ‘__return_true’ );
    Add that in a custom plugin or your functions.php if you have a child theme.
    More on how to create a simple plugin at https://ewww.io/2016/03/16/ewww-image-optimizer-filters-part-1/

    Thread Starter seanpaulfx

    (@seanpaulfx)

    Works perfectly

    Is there a way to customize the upload function size of the ACF plugin?

    Thank you

    Plugin Author nosilver4u

    (@nosilver4u)

    If ACF is sending any query parameters that uniquely identify it, or the referring URL contains any clues regarding ACF, then you can tweak the dimensions used via this filter:

    // NOTE: filters MUST return an array of 2 items, or the defaults will be used.
    return apply_filters( 'imsanity_get_max_width_height', array( $w, $h ), $source );
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Image size error’ is closed to new replies.