Home › Forums › Backend Issues (wp-admin) › Choose image size in ACF-Image Field › Reply To: Choose image size in ACF-Image Field
Thank you, this helped me a lot. I know use an if statement in the template to check if it is a gif file and if then use the original image.
<?php if (exif_imagetype($image['url']) != IMAGETYPE_GIF) { ?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
<?php } else { ?>
<img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo $image['alt']; ?>" />
<?php } ?>
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.