syamilmj / Aqua-Resizer

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

Suggestion #27

Closed wpexplorer closed 11 years ago

wpexplorer commented 11 years ago

rather then returning false:

if ( ! $dims || ( true == $crop && false == $upscale && ( $dst_w < $width || $dst_h < $height ) ) ) { // Can't resize, so return false saying that the action to do could not be processed as planned. return false; }

This should probably just return the main image ($url). Better to show an un-cropped image then a broken image. No?

mxmzb commented 11 years ago

Well, imho it's not better. If I let a script crop something and get an image url returned if the process succeeded and failed, I have no possibility to distinguish between both cases and to fall back somehow if needed on fail. You still can do $thumb = aq_resize( ... ); if ( !$thumb ) $thumb = $orig_src; and have absolutely the same result...