Get image height and width of image stored on Amazon S3

amazon-s3, image, information-retrieval

Solution

Getting the file size is possible by reading the `Content-Length` response header to a simple `HEAD` request for your file. Maybe your client can help you with this query. More info on the S3 API docs.

Amazon S3 just provides you with storage, (almost) nothing more. Image dimensions are not accessible through the API. You have to get the whole file, and calculate its dimensions yourself. I'd advise you to store this information in the database when uploading the files to S3, if applicable.

Problem

I plan to store images on Amazon S3 how to retrieve from Amazon S3 : - file size - image height - image width ?

Original source