Support

Account

Home Forums General Issues ACF file field: Getting generated images from PDF Reply To: ACF file field: Getting generated images from PDF

  • I have finally found a working solution:

    <?php
    $file = get_field('dokumente_datei');
    $url = $file['url'];
    $image_id = $file['id'];
    $image_url = wp_get_attachment_image($image_id,'medium');
    if( $file ): 
    
    ?>
        <a href="<?php echo $file['url']; ?>">
           <?php echo ($image_url); ?></a>
    
    <?php endif; ?>