Home › Forums › ACF PRO › Are custom image sizes still available? › Reply To: Are custom image sizes still available?
it is possible to use a non-standard image size.
as far i can see you use the correct variables.
$image = get_field('your_image_field'); $size = 'name_of_size'; $url = $image['sizes'][ $size ]; $width = $image['sizes'][ $size . '-width' ]; $height = $image['sizes'][ $size . '-height' ];
just to get sure that your preferred size exist, what is inside your image variable?:
$image = get_field('your_image_field'); echo '<pre>'; echo htmlspecialchars(print_r($image,true)); echo '</pre>';
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
Are you building WordPress sites with ACF and @BeaverBuilder, and wanted to use your ACF Blocks in both the block editor and Beaver Builder?— Advanced Custom Fields (@wp_acf) May 10, 2023
The BB team recently added support for using ACF Blocks in Beaver Builder. Check it out 👇https://t.co/UalEIa5aQi
© 2023 Advanced Custom Fields.