Support

Account

Home Forums ACF PRO ACF Image Array head scratcher

Solved

ACF Image Array head scratcher

  • I’m using multiple ACF image array instances in combination with a lazyload script on a site currently in development.

    While reviewing site performance tests (Pagespeed Insights, GTMetrix, etc), we noticed that the ACF array was not spitting out the correct image sizes on our staging environment. However, checking the cloned code/db on the localhost setup, it’s working as expected.

    I’ve successfully regenerated thumbnails via the Regenerate Thumbnails plugin on the staging environment.

    The below image shows the issue via var_dump: Staging on the left / Localhost setup on the right.

    side-by-side comparison of ACF Arrays

  • Generally, when WP returns the base file name for a file rather than a specific size (adding -600×400 for example) it means that the original file is actually smaller than the image size that needs to be returned. It’s not easy to see by this what can be causing it, however, my guess, and the first place I’d start, is so make sure that the full size images on the server for the left are actually the full sized images and that these have not all been replaced for some reason by the smallest image from the server on the right.

  • Thanks John.

    It turns out the GD image library was disabled on our staging environment. That was the culprit.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘ACF Image Array head scratcher’ is closed to new replies.