How to get image size (width vs height) from S3 w/o downloading it?

Viewed 1464

How to get image size (width vs height) from S3 w/o downloading it?

With filesystem I am using PIL:

from PIL import Image

def get_image_size(filepath):
    try:
        with Image.open(filepath) as image:
            return image.size
    except:
        return None

How to do the same with boto3?

0 Answers
Related