Answer the question
In order to leave comments, you need to log in
acf plugin, how to display thumbnail image?
Hello. In single.php I display the image with the following code:
<?php
$image = get_field('image');
if( !empty($image) ): ?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
<?php endif; ?>
Answer the question
In order to leave comments, you need to log in
Store the image as an ID, there is such an option. Then output like this
$image = get_field('image');
if( !empty( $image ) ) {
echo wp_get_attachment_image( $image, 'thumbnail' );
<?php
$image = get_field('image');
if( !empty($image) ):
$thumb = bfi_thumb( $image['url'], ['width' => 100, 'height' => 100, 'crop' => true] );
printf('<img src="%s" alt="%s" />',$thumb, $image['alt'])
endif; ?>
It is strange that you do not use the search, because the answer to your question is described in detail here - https://www.pandoge.com/stati-i-sovety/poluchaem-p...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question