Closed k1o0 closed 2 months ago
Automatic resize implemented when uploading via REST, need a way to avoid this resize when GIF detected, still need to implement a check on size.
Here are the relevant files for the image upload in Alyx. If image_width is 'orig', the file isn't resized, so this could be solved by simply settings this in the REST query. You could try this out then make this an option in ibllib code. https://github.com/cortex-lab/alyx/blob/master/alyx/misc/models.py#L149-L168 https://github.com/cortex-lab/alyx/blob/master/alyx/misc/views.py#L126-L141 https://github.com/cortex-lab/alyx/blob/master/alyx/misc/serializers.py#L11-L47
Animated GIFs are somehow converted to inanimate images when uploaded via REST, however this does not happen when they are uploaded via the admin interface web form. Supporting animated GIFs would be very useful for imaging snapshots.