Support

Account

Home Forums General Issues Image Field Not Showing Image

Helping

Image Field Not Showing Image

  • Hello all,
    I’ve played around with ACF and find it very useful. However, I went and created a image field with the id “cover_art” and implemented the code showed on the docs gives me no image. If I view it’s URL is give me a post URL with the end bit chopped off like:

    http://site.com/post/123-456-

    I’ve also used :

    <?php
    $image = get_field('cover_art');
    if( $image): 
       $alt = $image['alt'];		
       $thumb = $image['url'];
       $width = $image['width'];
       $height = $image['height'];
       ?>
    
       <img src="<?php echo $thumb; ?>" alt="<?php echo $alt; ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>" class="thumb_285_350" />
    										
    <?php endif; ?>

    And did not work.

  • Ah, I figured out. I went back to settings and played with the properties and seems that the issue was cause by selecting return value.

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

The topic ‘Image Field Not Showing Image’ is closed to new replies.