When uploading gif using create: options

Hi there.
I’ve made a images.yml blueprint for when my user uploads an image.
But uploading a gif reduces the gif animation to a simple jpg file, removing then the animation.

title: Image
accept: image/jpeg, image/png, image/gif

create:
  width: 2560

fields:
  alt:
    label: Alt text
    type: text

Is there a way I could avoid that for gif files? Keeping the animation, and maybe not reducing the file, while keeping the create: width: 2560 for png and jpeg?

Thanks a lot.

Hm, there is no option to prevent this. Only idea I could come up with is to remove gif files from the resizable file extensions in a plugin

	public static array $resizableTypes = [
		'jpg',
		'jpeg',
		'gif',
		'png',
		'webp'
	];

Which image driver are you using? If its GD, switch to IM. GD is unable to resize Gifs and retain the animation, you end up with the first frame resized. IM can resize Gifs and keep the animation.

3 Likes

Yeap, thanks, that’s the simplest way to do!