S3
S3 copied to clipboard
Image Resizing
This package is great! Thank you for your work on it.
I am using the package to upload images to S3 and would like to resize them before they get to S3. What would be the most efficient/correct way to do this?
I'm also interested in this. Thanks
I'm working on a small package that combine this package, image manipulation and upload to FS.
Sweet, what's the github URL? Want me to collaborate?
Give me few days to clean up the code.
@gibex you meant few years ?
@capensisma Oh snap.
@reimertz Oh snap snap :D
Lol
@Lepozepo is here :D :+1:
any updates on this issue?
Is there any easy way to resize image before uploading to S3? I tried to use lepozepo:s3 with https://atmospherejs.com/thinksoftware/image-resize-client but this approach doesn't work. I don't help any experience with meteor so any help is appreciated.
Just thinking out loud here... it would be bit delayed but couldn't you kick off a AWS Lambda job to do this work? Maybe upload to temp bucket then Lambda job runs, does image work and moves image to live bucket then whacks temp bucket image. Or something like that.
You totally could! I had never heard of Lambda, sounds useful. Maybe those functions can be a part of an extended version of this package. Or you can build them out yourself.
Thank you!
Marcelo Reyna 702 769 0639
On Dec 20, 2015, 8:08 AM -0800, [email protected], wrote:
Just thinking out loud here... it would be bit delayed but couldn't you kick off a AWS Lambda job to do this work? Maybe upload to temp bucket then Lambda job runs, does image work and moves image to live bucket then whacks temp bucket image. Or something like that.
— Reply to this email directly orview it on GitHub(https://github.com/Lepozepo/S3/issues/78#issuecomment-166132651).
guys, there are services for this. very cheap ones. they're very powerful and stable and easy to use. take imgix for example.
I completely agree, I personally prefer Cloudinary since it starts free.
Marcelo Reyna 702 769 0639
On Mar 3, 2016, 11:44 PM -0800, Krister [email protected], wrote:
guys, there are services for this. very cheap ones. they're very powerful and stable and easy to use. takeimgix(https://www.imgix.com/)for example.
— Reply to this email directly orview it on GitHub(https://github.com/Lepozepo/S3/issues/78#issuecomment-192165796).
I used this library to resize, compress and get EXIF datas from images client-side before uploading them: https://github.com/blueimp/JavaScript-Load-Image.
As a side note, I'm currently moving from Cloudinary to S3 because it's not cheap at all: ~50$/month for >2Gb storage. Would love a service that just convert one image to another(s), like Cloudinary does, but doesn't store them... (did someone already tried https://cloudconvert.com/api?)
Hey Nico, I'm planning to build a small inexpensive solution for these issues. Your upload would hit our servers, transform, then drop to your S3. I was thinking per image pricing would work at pennies or less per processed image. Is this something you would be interested in?
I guess the main points would be the pricing and ease of use. Would it be possible to "hook" new image uploads in a S3 bucket and then create new thumbnails automatically (based on some kind of preferences managed in your service)? The best would be not to have to change my current workflow with this package ;)
Definitely, I'll let you know as soon as I have something up to have you on beta ^_^
Hey y'all I just implemented exactly that kind of resizing behaviour using Lambda on AWS which means no extra spending on transfers between servers. It took me a while to get it to work but finally it's working. If anyone is still insterested I can get you the walkthrough I followed along with the changes I had to make.
Totally interested
Basically it's this Blog Post, change the dimensions and compression as you like directly in the javascript file. The thing I had the most problems with was npm install
which was strangely giving me some errors and then figuring out the AWS service roles! Basically you have to create a new IAM user and give him a role where its permissions are S3readandWrite as well as AWSLambdaExecute. After that everything clicked and my two connected buckets work seamlessly. I just added some code on my side to "fetch" the original uploaded url and get it on my database as its resized versions url & voilá. There's one catch though, Lambda cannot work with files bigger than 2.2 Mb. It won't break or anything simply won't do any resizing. It's a lambda limitation I had faced before so you should implement some "safety measures" on your own to prevent uploading images bigger than around 2 Mb.
Awesome!
@Lepozepo If you could implement something for us to have those kind of "safety measures" on the package itself it would be awesome. Just something simple such as limiting file size or file type would be great already. Thanks for a great package!
@johnmore definitely want to put some more time into this :D