Skip to content

Commit

Permalink
Merge pull request #100 from Smartik89/patch-1
Browse files Browse the repository at this point in the history
Bug fix: Return the original image instead of resized
  • Loading branch information
syamilmj authored Jun 7, 2017
2 parents dbedbc9 + e00a662 commit 57fe7e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aq_resizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* Title : Aqua Resizer
* Description : Resizes WordPress images on the fly
* Version : 1.2.1
* Version : 1.2.2
* Author : Syamil MJ
* Author URI : http://aquagraphite.com
* License : WTFPL - http://sam.zoy.org/wtfpl/
Expand Down Expand Up @@ -118,7 +118,7 @@ public function process( $url, $width = null, $height = null, $crop = null, $sin
$dst_h = $dims[5];

// Return the original image only if it exactly fits the needed measures.
if ( ! $dims && ( ( ( null === $height && $orig_w == $width ) xor ( null === $width && $orig_h == $height ) ) xor ( $height == $orig_h && $width == $orig_w ) ) ) {
if ( ! $dims || ( ( ( null === $height && $orig_w == $width ) xor ( null === $width && $orig_h == $height ) ) xor ( $height == $orig_h && $width == $orig_w ) ) ) {
$img_url = $url;
$dst_w = $orig_w;
$dst_h = $orig_h;
Expand Down

0 comments on commit 57fe7e7

Please sign in to comment.