Aqua-Resizer icon indicating copy to clipboard operation
Aqua-Resizer copied to clipboard

Amazon S3 ?

Open wpexplorer opened this issue 11 years ago • 11 comments

Has anyone been able to get Aqua re-sizer working with Amazon S3? I get a lot of frustrated customers who want to host their images externally. I'm not really sure what to tell them. I usually just point them to how they disable the cropping and just return the $url.

Wondering how you guys are handling it? Or there is a potential way to get it working with S3.

Thanks! AJ

wpexplorer avatar Jun 11 '13 17:06 wpexplorer

I'd love to test this out if I can have a dev site to play around with

Cheers

syamilmj avatar Jun 12 '13 06:06 syamilmj

I'd love to get you one. Maybe when I have some time to set something up ;) Was hoping others had some ideas.

I was thinking I can provide a fallback with set_post_thumbnail_size() that they can activate via the admin panel incase aqua isn't working....

wpexplorer avatar Jun 12 '13 21:06 wpexplorer

Syamilmj Hit me up with what you need. I'll setup a dev site for you to play with. I love Aquaresizer, but the lack of Amazon S3 or CDN support leads me to not use it.

BradShoemaker avatar Aug 19 '13 19:08 BradShoemaker

Hi Syamilmj, I purchased a WP theme that uses you script, as reported before it did not work with S3. I have to use S3 b/c the site is hosted on cloud environment so no persistent file storage.

For now, all I did to make it work is comment two lines:

//check if $img_url is local
//if(strpos( $url, $upload_url ) === false) return false;
//check if img path exists, and is an image indeed
//if( !file_exists($img_path) OR !getimagesize($img_path) ) return false;

Resizing works fine on the theme after this patch. What do you think?

PS: I too can offer a dev environment if you want to test things out, or you could also get a free-tier with Amazon and a free dev account with appfog.com (one click to install WP) and then add the S3 upload plugin.

grupster avatar Sep 05 '13 18:09 grupster

Which theme was it on? I tried it on another theme and it winds up breaking it.

BradShoemaker avatar Sep 05 '13 20:09 BradShoemaker

I tried it on this theme: http://switcher.madeinebor.com/?theme=MyFolio And here's a running example: http://www.quintazerene.com/

grupster avatar Sep 05 '13 23:09 grupster

Here is a little hack to make the script work with cdn. Add this at line 81 before "//Check if $img_url is local".

// Change the upload url to the cdn upload url. $upload_url = 'http://cdn.xxxx.xxx/wp-content/uploads';

mathieuforest avatar Oct 23 '14 01:10 mathieuforest

I guess one can directly comment out

if ( false === strpos( $url, $upload_url ) ) return false;

anteksiler avatar Jun 15 '15 14:06 anteksiler

Any progress on using aq_resize with S3? I have bought a theme that uses aq_resize a lot. Proposed solutions above do not work.

dima-stefantsov avatar Apr 19 '16 11:04 dima-stefantsov

All 3 of the solutions on this thread fail to work. Are there any other suggestions or workarounds anyone can suggest? I need to use this with AWS S3 and Cloudfront.

thelonious89 avatar Jul 15 '17 23:07 thelonious89

I've just built an integration for Aqua Resizer with AWS S3. It will require you to also upload the AWS SDK, but I've built in the functionality to serve resized images from S3 and copy resized images from local server to S3.

https://github.com/richardyu314/aqua-resizer-s3/blob/master/aqua-resizer.php

richardyu314 avatar Aug 14 '18 11:08 richardyu314