Home Forums Air WordPress Theme Carousel images are not sized properly Reply To: Carousel images are not sized properly

#12812

Priam
Participant

I fixed this problem by adding an inline style to the “portfolio-slider.php” template. I added

style="max-width:1000px;height: auto;"

to the line

$image_lazyload_img_style = 'src="' .esc_url($thumb_url). '"';

so that the image doesn’t scale larger than the medium thumbnail width. The theme’s medium thumbnails are scaled based on a maximum width, not height, so it’s not necessary to also specify a max height. This css solution seems to do the trick. If you have a better suggestion for how this can be implemented, let me know.

Thanks.