media module

lib.media.downsize(filepath: pathlib.Path) pathlib.Path

Resize an image by half and save the file with a ‘resized’ descriptor.

Social media APIs (i.e. Twitter) have a 5MB size limit, this will make sure the image can be posted and is saved for future use.

Parameters

filepath (Path) –

Return type

Path