Page 1 of 2

How to add gif images to products from backend

Posted: 13 Dec 2018, 15:28
by kosarlatif
I tried to upload a gif image to product using backend but on upload the image is coverted to simple image with no animation. Please give some suggestion on how to resolve this.

Re: How to add gif images to products from backend

Posted: 13 Dec 2018, 23:02
by aimeos
Images are passed through the GD image methods by default (imagegif() in your case) and this seem to remove animations. You could try Imagick instead, maybe it keeps the animations. Add this to your ./config/shop.php file in the "controller" section:

Code: Select all

'common' => ['media' => ['standard' => ['options' => ['image' => ['name' => 'Imagick', 'quality' => 100]]]]]

Re: How to add gif images to products from backend

Posted: 14 Dec 2018, 10:30
by kosarlatif
Now getting the following error :

http://prntscr.com/luuvlu

Re: How to add gif images to products from backend

Posted: 14 Dec 2018, 14:10
by aimeos
You don't have the php-imagick extension installed

Re: How to add gif images to products from backend

Posted: 14 Jan 2019, 17:09
by awaidqureshi
aimeos wrote:Images are passed through the GD image methods by default (imagegif() in your case) and this seem to remove animations. You could try Imagick instead, maybe it keeps the animations. Add this to your ./config/shop.php file in the "controller" section:

Code: Select all

'common' => ['media' => ['standard' => ['options' => ['image' => ['name' => 'Imagick', 'quality' => 100]]]]]
\
I have used this code butt again its saving .gif file without animation. Please Help about this issue.

Re: How to add gif images to products from backend

Posted: 15 Jan 2019, 12:39
by aimeos
Can you please execute

Code: Select all

composer require aimeos/aimeos-core:2018.10.x-dev
and try again? If you don't have maxwidth and maxheight for images set, they will be now unchanged.

Re: How to add gif images to products from backend

Posted: 18 Jan 2019, 08:43
by awaidqureshi
aimeos wrote:Can you please execute

Code: Select all

composer require aimeos/aimeos-core:2018.10.x-dev
and try again? If you don't have maxwidth and maxheight for images set, they will be now unchanged.
after executing this there is an database error which i have methined in diff topic

laravel-package-f18/during-aimeos-setup ... t1833.html
Kindly help me about these issue

Re: How to add gif images to products from backend

Posted: 11 Feb 2019, 12:05
by Erik
I'm running Aimeos in a Docker environment with ImageMagick installed, have set the controller to Imagick, and have cleared the max image sizes in https://github.com/aimeos/aimeos-larave ... t.php#L271
Still I'm having no luck in saving gifs while maintaining the animation, it keeps only saving the first frame. Is there anything I might have missed, or if all else fails, is there a way to upload mp4s instead of an image to the product?

Re: How to add gif images to products from backend

Posted: 12 Feb 2019, 12:06
by aimeos
Maybe Imagick simply doesn't support animations when saving GIF files. If no max width/height is given, the file isn't scaled but only read and written again.

You can upload videos in the "Image" tab of the admin interface too as well as all other files. In the 2019.x releases, the tab has been renamed to "Media".

Re: How to add gif images to products from backend

Posted: 12 Feb 2019, 17:03
by Erik
aimeos wrote:Maybe Imagick simply doesn't support animations when saving GIF files. If no max width/height is given, the file isn't scaled but only read and written again.

You can upload videos in the "Image" tab of the admin interface too as well as all other files. In the 2019.x releases, the tab has been renamed to "Media".
Thank you! I feel a bit stupid that I did not just try that but it's working perfect now.