Get full url of plupload image on frontend

Support MB Group Get full url of plupload image on frontend

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2964
    nlansdellnlansdell
    Participant

    Hi All,

    How do I get the full url of a plupload image when it is part of a group? I am using:

    foreach ( $group_values as $group_value ) {
       $image = isset( $group_value['rw_sectionImg'] ) ? $group_value['rw_sectionImg'] : '';
       
       foreach ($image as $img ) {
          echo $img;
       }

    But this is only returning a number - 575859.

    What am I doing wrong, all my text and wysiwyg fields are displaying perfectly.

    Many thanks in advanced.

    #2968
    Anh TranAnh Tran
    Keymaster

    Hi, you can use the function wp_get_attachment_image_url like this:

    foreach ($image as $img ) {
        $img = wp_get_attachment_image_url( $img, 'full' );
        echo $img;
    }

    Change full to another image size if you don't want full size.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Get full url of plupload image on frontend’ is closed to new replies.