Support

Account

Home Forums General Issues Standard Crop doesn't work on ACF Images Reply To: Standard Crop doesn't work on ACF Images

  • Hi there,

    I’m having the same problem. I’ve tried on a test site with no other plugins installed and I get the same behaviour. To replicate:

    • I added an image type field to a post.
    • I added a landscape image to that field on a test post.
    • I used the following code to show the field on the front end:
      
      <?php $image = get_field('image', get_the_ID()); ?>
      <img src="<?php echo $image['sizes']['large']; ?>" alt="<?php echo $image['alt'] ?>">
      
    • The image displayed the landscape image constrained to the ‘large’ image size.
    • I cropped the image to a square using WordPress’s built in image editing functionality, using the Apply changes to all image sizes setting.
    • On the front end the image returned was the ‘large’ image size.
    • I tried using $image['url'] instead and I get the correct image size.

    So it looks like it’s only using the right image for the raw image size, when the crop was applied to all image sizes. If my original is in some cases very large, I don’t want to just be outputting that.

    Can someone advise? Thanks!!