Support

Account

Home Forums ACF PRO Are custom image sizes still available? Reply To: Are custom image sizes still available?

  • Hey mediawerk, thanks very much for your reply.

    Yeah it looks like the size isn’t actually being returned – even though the size definitely does exist. I was wondering if it was perhaps a problem in ACF – or something that has changed? I’ve been using the same code in quite a few sites and it’s been working fine for some time, but I recently upgraded to ACF Pro…

    Here’s the output:

    Array
    (
        [ID] => 659
        [id] => 659
        [title] => MOT_WAPOL_D2_ 110
        [filename] => MOT_WAPOL_D2_-110.jpg
        [url] => http://###/uploads/2015/07/MOT_WAPOL_D2_-110.jpg
        [alt] => 
        [author] => 1
        [description] => 
        [caption] => 
        [name] => mot_wapol_d2_-110
        [date] => 2015-07-10 00:58:30
        [modified] => 2015-07-10 00:58:30
        [mime_type] => image/jpeg
        [type] => image
        [icon] => http://###/wp-includes/images/media/default.png
        [width] => 3504
        [height] => 2336
        [sizes] => Array
            (
                [thumbnail] => http://###/uploads/2015/07/MOT_WAPOL_D2_-110-150x150.jpg
                [thumbnail-width] => 150
                [thumbnail-height] => 150
                [medium] => http://###/uploads/2015/07/MOT_WAPOL_D2_-110-300x200.jpg
                [medium-width] => 300
                [medium-height] => 200
                [large] => http://###/uploads/2015/07/MOT_WAPOL_D2_-110-1024x683.jpg
                [large-width] => 960
                [large-height] => 640
            )

    As I mentioned before, the size is coming through fine everywhere else, including in the ‘Preview size’ setting in the Image field settings in ACF.

    However… I think I just found the problem – possibly a bug! I’m actually using a field on an options page (so my code is $image = get_field('my_image',"options");). When I don’t use it on an options page, all the sizes come through ok!

    Is anyone else able to replicate this?