我使用Slidedeck pro wordpress(动态滑块),并将其设置为从帖子的图库中提取第一幅图像作为图像。然而,当我真的需要500px的图像时,它不断地将图像大小调整到270px。有人知道如何补救吗?
我确实找到了一个具有调整大小比率的模板文件。然而,我甚至不知道要改变什么才能达到我需要的500px宽度。
// 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\'] );
}
}
}
我之前确实试过把270改成500,但没有成功。