As of today, the smush.it api endpoint expects all spaces in file name to be URL encoded pluses (%2B).
e.g.:
Image Name = image with spaces.png
This returns null:
http://www.smushit.com/ysmush.it/ws.php?img=http://s3.amazonaws.com/BUCKET/image%20with%20spaces.png
This returns the expected response:
http://www.smushit.com/ysmush.it/ws.php?img=http://s3.amazonaws.com/BUCKET/image%2Bwith%2Bspaces.png
- The Autosmush library does not URL encode the image file path at all before calling CURL
- The special case of replacing spaces with plusses needs to be added before URL encoding
As of today, the smush.it api endpoint expects all spaces in file name to be URL encoded pluses (%2B).
e.g.:
Image Name = image with spaces.png
This returns null:
http://www.smushit.com/ysmush.it/ws.php?img=http://s3.amazonaws.com/BUCKET/image%20with%20spaces.png
This returns the expected response:
http://www.smushit.com/ysmush.it/ws.php?img=http://s3.amazonaws.com/BUCKET/image%2Bwith%2Bspaces.png