syamilmj / Aqua-Resizer

Resize WordPress images on the fly
502 stars 205 forks source link

Small image problem #76

Open Ninetheme opened 8 years ago

Ninetheme commented 8 years ago

$image = aq_resize( $img_urls, 450, 450, true ); //resize & crop the image

Hello all

if you add a image is smaller 450px aqua resizer will not working. Any idea ?

Best regards

emanuelpoletto commented 8 years ago

Hi

I think you have to use all the parameters available in the function, specially the last one: aq_resize( $url, $width = null, $height = null, $crop = null, $single = true, $upscale = false )

Have you tried this? $image = aq_resize( $img_urls, 450, 450, true, true, true ); //resize & crop the image & it's single & upscale it

Hope it helps ;)

Ninetheme commented 8 years ago

Hi Hero :)

$img_urls = wp_get_attachment_url( $v['testi_img'],'full' ); //get full URL to image (use "large" or "medium" if the images too big) $images = aq_resize( $img_urls, 109, 109, true,true,true ); //resize & crop the image

working perfect, thank you so much. Also a note :

if you use a lot of image types in your themes/plugins you must use different foreach name and e.g

have a nice day!