Only apply Square to image sizes that need it
-
Hi there,
Great plugin that should save a lot of time!
Unfortunately, it applies the Square transformation to sizes that should not be square (eg. featured: 1500×430) and as such makes these images physically larger than their required dimension (eg. 1500 x 1500).
Temporarily, I modified my admin/class-square-thumbnails-admin.php to check that the required size width=height as follows:
357 foreach($meta['sizes'] as $size=>$m){ 358 if ($m['width'] == $m['height']) { 360 //$m['file']=$path->dir.$m['file']; 361 $result=$this->create_square($m); 362 $meta[$size]['width']=$result->sqW; 363 $meta[$size]['height']=$result->sqH; 364 } 365 }
This just applies the pad transform to images that SHOULD be square.
Could you add a check box to make this optional?
- The topic ‘Only apply Square to image sizes that need it’ is closed to new replies.