kevingilbert100
kevingilbert100

Reputation: 1333

WordPress Image Shortcode Exporting Thumbnail Sized Image

To get it out of the way here is my code

        <!-- Start Slider -->
<?php
            // Get Data From Meta
            $images = rwmb_meta( 'cam_slider_images', 'type=image_advanced' );
            // Blank Variable To Append Too
            $slider_image_output = "";
            // Append Meta Value To Variable
    foreach ( $images as $image )
    {
        $slider_image_output.= '[slide][image src="'.$image['url'].'" alt="'.$image['alt'].'"][/slide]';
    }
    // Echo The Shortcode With WordPress :)
    echo (do_shortcode('[slider animation="fade, slide" slide_time="4000" slide_speed="500" slideshow="true" random="true" control_nav="false" prev_next_nav="true" no_container="true"]'. $slider_image_output . '[/slider]'));
?>
<!-- End Slider -->

I am attempting to display the images in the slider shortcode, now it works great however on the page the images only come out to be 150x150 pixels which is thumbnail size. So if you look at the image src url in firebug etc its -150x150.. so I was wondering how could I make WordPress export fullsize.

I am using the X theme and its shortcodes.

Thanks in advance.

EDIT

Also using the following plugin for my meta box

http://metabox.io/docs/get-meta-value/

Upvotes: 0

Views: 128

Answers (1)

Alex
Alex

Reputation: 17289

I don't 100% get what exactly you are trying to achieve , but using documentation page you sent,

you can try change your line :

$slider_image_output.= '[slide][image src="'.$image['url'].'" alt="'.$image['alt'].'"][/slide]';

to this one:

$slider_image_output.= '[slide][image src="'.$image['full_url'].'" alt="'.$image['alt'].'"][/slide]';

Upvotes: 1

Related Questions