Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I was using Slidedeck pro wordpress (dynamic slider), and set it to pull in the first image from the post's gallery as the image. However, it keeps resizing the image down to 270px when I really need to have the image at 500px. Does anyone know how to remedy this?

I did find a template file with the resizing ratio. However, I am not even sure what to change to achieve the 500px width I need.

// Correct image aspect ratio to fit within skin's image constraints
if( !empty( $image ) ){
    if( !empty( $image['width'] ) ){
        if( $image['width'] > 270 ){
            $w_ratio = 270 / $image['width'];
            $image['width'] = floor( $w_ratio * $image['width'] );
            if( isset( $image['height'] ) ) {
                $image['height'] = floor( $w_ratio * $image['height'] );
            }
        }
    }
    if( !empty( $image['height'] ) ){
        if( $image['height'] > 250 ){
            $h_ratio = 250 / $image['height'];
            $image['width'] = floor( $h_ratio * $image['width'] );
            $image['height'] = floor( $h_ratio * $image['height'] );
        }
    }
}

I did try changing 270 to 500 earlier to no avail.

share|improve this question
    
If you're (really) using the "PRO" version, then there's support available... –  kaiser Jun 5 '11 at 16:28
    
agreed but ill update my answer below –  xLRDxREVENGEx Jun 5 '11 at 16:54

1 Answer 1

does it have a control panel with sizing options? Is there any mention of 270px at all in the files. If not then either your image is 270px or WordPress is resizing it. If WordPress is doing it check out this page settings>media

EDIT:

// Correct image aspect ratio to fit within skin's image constraints
if( !empty( $image ) ){
if( !empty( $image['width'] ) ){
    if( $image['width'] > 500 ){
        $w_ratio = 500 / $image['width'];
        $image['width'] = floor( $w_ratio * $image['width'] );
        if( isset( $image['height'] ) ) {
            $image['height'] = floor( $w_ratio * $image['height'] );
        }
    }
}
if( !empty( $image['height'] ) ){
    if( $image['height'] > 250 ){ // Change the 250. This is the height you want so change to your height you use for your images
        $h_ratio = 250 / $image['height']; // Same here change the 250
        $image['width'] = floor( $h_ratio * $image['width'] );
        $image['height'] = floor( $h_ratio * $image['height'] );
    }
}
}

Note that if you update the plugin you will have to change this every time. It is best to ask the dev if there are any plans for a control panel or a place to assign custom sizes.

share|improve this answer
    
Yeah, I asked there but it has been 4 days since a response, so I thought I would ask people here. –  Louis Stephens Jun 6 '11 at 0:34
    
did this work at all. if so mark as answered. Also just goes to show that paid plugin support is sometimes not better then free plugin support. I have had the same issue happen on wpmudev –  xLRDxREVENGEx Jun 6 '11 at 2:02
    
Oh my apologies. Changing the '270' to '500' didnt work. Somehow it is being overridden somewhere. –  Louis Stephens Jun 6 '11 at 12:34
    
Hi Louis, how did you eventually resolve this issue if ever? I'm trying to tinker with the slides using CSS. Not having any luck. –  Adam Aug 28 '11 at 14:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.