• Resolved Imageraoul_k

    (@raoul_k)


    Hi.

    I’m using the latest version of the WordPress. The plugin works great and I love it. But one function doesn’t work: displaying images:

    <?php if($atts['image_id']): ?>
    			<img src="<?php wp_get_attachment_image_src($atts['image_id'], 'full') ?>" alt="" />
    			<?php endif; ?>

    ..doesnt give me an image.

    <?php echo $atts['image_id'] ?>

    however does give me the id of the image.

    I’m using the original code, provided in the example.php

    https://wordpress.org/plugins/minimal-shortcode-ui/

Viewing 1 replies (of 1 total)
  • Plugin Author ImageMax

    (@maxdw)

    Hey raoul_k, good to hear you like the plugin. You are right about wp_get_attachment_image_src not giving you the image. I have fixed the example.php file in 1.0.3 have a look there to fix this issue.

    Turns out when writing the example I assumed wp_get_attachment_image_src would return the path of the image but instead it returns the image attributes in an array(path, width, height).

Viewing 1 replies (of 1 total)

The topic ‘Image Code not working’ is closed to new replies.