Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Problem uploading GIF images to Storefront #20

Closed
juliomoreira opened this issue Jun 27, 2019 · 6 comments
Closed

Bug: Problem uploading GIF images to Storefront #20

juliomoreira opened this issue Jun 27, 2019 · 6 comments

Comments

@juliomoreira
Copy link

Describe the bug
GIF images are loosing animation when uploaded to Storefront

To Reproduce
Steps to reproduce the behavior:

  1. Go to Storefront;
  2. Edit an element that supports image upload like a Carousel;
  3. Upload animated GIF file;
  4. See that the image looses its animation properties;

Expected behavior
Uploading animated GIFs should retain animation data;

@hapoza
Copy link
Contributor

hapoza commented Jun 28, 2019

@brunojdo Had told me that they're not going to allow GIF's, it's vtex.file-manager-graphql that strips the frames from the file, because GIF's are very large and would negatively impact the website performance.
The ideal case that he mentioned, is for vtex.file-manager-graphql to allow upload of videos, and following this best practice for animated images as videos https://web.dev/replace-gifs-with-videos
But for that to work, the "image renderers" all should be updated to render self playing videos (like image, carousel, info-card).

I already have an issue with the same discussion vtex-apps/file-manager-graphql#4

Workarounds for now could be to use rich-text or sandbox, but that doesn't work for all cases (like carousel)

@klzns klzns added the enhancement New feature or request label Jun 28, 2019
@fabiofeichtinger
Copy link

I think this approach is too aggressive, a lot of big e-commerce use gifs as medium type. For example Americanas.com, Dafiti:
https://images-americanas.b2w.io/spacey/2019/07/01/semana-tec_ESTRELA_28-06_02-CEEEERTO.gif
https://dafitistatic-a.akamaihd.net/cms/onsite/2017/HomeNeutra_285x155_Socialmedia_110717.gif

This image above only has ~100kb.

I don't know if the market is prepared to this mindset, maybe it should be considered in a future release as a Major of the StoreFront, allowing stores to migrate to this new paradigm after it's mature enough.

@fabiofeichtinger
Copy link

Maybe the solution is limit the file update maximum size more than block gifs

@saviomuniz saviomuniz added feature-request and removed enhancement New feature or request labels Jul 4, 2019
@klzns
Copy link
Contributor

klzns commented Jul 5, 2019

I think we should accept GIFs as upload files and transform them to mp4 or WebM in our backend.

As suggested here: https://web.dev/replace-gifs-with-videos

@saviomuniz
Copy link
Contributor

We do have a way of displaying GIFs in the store, although not recommended nowadays for performance issues, like pointed previously. You guys could use the Image component and use the src prop to point to a gif image.

@klzns
Copy link
Contributor

klzns commented Feb 20, 2020

Fixed some time ago

@klzns klzns closed this as completed Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants