Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amazon S3 ? #32

Open
wpexplorer opened this issue Jun 11, 2013 · 11 comments
Open

Amazon S3 ? #32

wpexplorer opened this issue Jun 11, 2013 · 11 comments

Comments

@wpexplorer
Copy link

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

@syamilmj
Copy link
Owner

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

Cheers

@wpexplorer
Copy link
Author

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....

@BradShoemaker
Copy link

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.

@grupster
Copy link

grupster commented Sep 5, 2013

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.

@BradShoemaker
Copy link

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

@grupster
Copy link

grupster commented Sep 5, 2013

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

@mathieuforest
Copy link

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';

@anteksiler
Copy link

I guess one can directly comment out

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

@dima-stefantsov
Copy link

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.

@thelonious89
Copy link

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.

@richardyu314
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants