Bases: object
The ThumbnailersManager has methods to register a thumbnailer with a type of file (an extension with the dot, like ".pdf") and to get a thumbnailer from a extension.
A thumbnailer is a function which takes 3 arguments:
- input_path: path of the input file
- original_filename: original filename, as uploaded by the user
- output_path: path where the thumbnail should be saved.
It returns True if the generated thumbnail should be resized to THUMBNAIL_SIZE, False otherwise.
A thumbnailer must generate a png file. If it fails, it must raise an exception.
In all methods, extension should be in lowercase and starts with a dot.
thumbnail size
Gets the best thumbnailer associated to extension. The best thumbnailer is the first registered thumbnailer for extension.