How to add gif images to products from backend

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
kosarlatif
Posts: 8
Joined: 12 Dec 2018, 18:50

How to add gif images to products from backend

Post by kosarlatif » 13 Dec 2018, 15:28

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.

User avatar
aimeos
Administrator
Posts: 3114
Joined: 01 Jan 1970, 00:00

Re: How to add gif images to products from backend

Post by aimeos » 13 Dec 2018, 23:02

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]]]]]
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

kosarlatif
Posts: 8
Joined: 12 Dec 2018, 18:50

Re: How to add gif images to products from backend

Post by kosarlatif » 14 Dec 2018, 10:30

Now getting the following error :

http://prntscr.com/luuvlu

User avatar
aimeos
Administrator
Posts: 3114
Joined: 01 Jan 1970, 00:00

Re: How to add gif images to products from backend

Post by aimeos » 14 Dec 2018, 14:10

You don't have the php-imagick extension installed
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

awaidqureshi
Posts: 51
Joined: 12 Jan 2019, 15:17

Re: How to add gif images to products from backend

Post by awaidqureshi » 14 Jan 2019, 17:09

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.

User avatar
aimeos
Administrator
Posts: 3114
Joined: 01 Jan 1970, 00:00

Re: How to add gif images to products from backend

Post by aimeos » 15 Jan 2019, 12:39

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

awaidqureshi
Posts: 51
Joined: 12 Jan 2019, 15:17

Re: How to add gif images to products from backend

Post by awaidqureshi » 18 Jan 2019, 08:43

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

Erik
Posts: 3
Joined: 05 Feb 2019, 16:30

Re: How to add gif images to products from backend

Post by Erik » 11 Feb 2019, 12:05

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?

User avatar
aimeos
Administrator
Posts: 3114
Joined: 01 Jan 1970, 00:00

Re: How to add gif images to products from backend

Post by aimeos » 12 Feb 2019, 12:06

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".
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Erik
Posts: 3
Joined: 05 Feb 2019, 16:30

Re: How to add gif images to products from backend

Post by Erik » 12 Feb 2019, 17:03

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.

Post Reply