β οΈ Media Upload Problem: GIFs posted or scheduled for LinkedIn are converted to static PNGs
π Description
When scheduling or posting a GIF to a connected LinkedIn account, the file is converted into a static PNG image in the final post. The animation from the original GIF is lost.
π Reproduction steps
- Go to your LinkedIn channel
- Create a new post.
- Upload an animated GIF file as the media for the post.
- Write any accompanying text.
- Either 'Post now' or schedule the post for a future time.
- Once posted, view the post on LinkedIn.
- Observe that the media is a non-animated, static PNG image of the first frame of the GIF.
π Expected behavior
The post on LinkedIn should display the fully animated GIF, just as it was uploaded in the app.
π Actual Behavior with Screenshots
The post on LinkedIn displays a static PNG image instead of the animated GIF. The animation is completely lost
π» Operating system
Linux
π€ Node Version
v20.18.1
π Provide any additional context for the Bug.
-
Videos will play and appear correctly within the app's preview before posting, but not GIFs.
-
The same GIF will publish fine from LinkedIn.
π Have you spent some time to check if this bug has been raised before?
- [x] I checked and didn't find similar issue
- [x] Checked Discord as well
Are you willing to submit PR?
None
Hi @escoolioinglesias - I'd like to work on this bug, can you please assign it to me? Thanks.
Hi @escoolioinglesias - I'd like to work on this bug, can you please assign it to me? Thanks.
@chahmedejaz Hi, thanks for taking a look at this! I'm sorry, unless I'm missing something, I don't think I can assign it to you π€ Not entirely sure how it works, but I've just reported the bug, I'm not a maintainer.
If I may request, @nevo-david, could you please assign this to @chahmedejaz ? Thank you! π
Apologies if my understanding is wrong and my reply doesn't make any sense!
This seems to be a media upload problem. I can't upload a gif without it being converted into a PNG. This seems like a big issue since it prevents all use of gifs.
I'm experiencing the same problem, basically my .gif files are converted to .png. Would be great if this gets fixed.
@chahmedejaz are you still available?
Yes, @egelhaus - I'd love to work on it. π
Update:
- I've almost fixed it. It's due to the issue with the file uploader. It uploads the GIF as a PNG, and hence, it loses the animation.
- I've fixed it such that it'll upload the GIF as it is
- Now, I'm working on keeping the animation in the LinkedIn post as well.
Hi everyone,
Just wanted to confirm before finalizing the fix, do we have DISABLE_IMAGE_COMPRESSION environment variable enabled on servers?
This is also one of the root causes for gifs to not maintain their animation. Thanks
Hello,
Following up on the latest update from @chahmedejaz
It appears the fix is dependent on clarifying a server-side setting:
Hi everyone, Just wanted to confirm before finalizing the fix, do we have
DISABLE_IMAGE_COMPRESSIONenvironment variable enabled on servers? This is also one of the root causes for gifs to not maintain their animation. Thanks
@egelhaus, apologies for the direct ping, but would you be able to offer any guidance on this question? It seems to be the last step needed to resolve this bug.
Thank you kindly!
Hi @chahmedejaz, just checking in to see if there has been any progress on the issue?
Thank you so much for your time and attention!
Hi @escoolioinglesias . It's finalized from my end for quite a while now. I'm just waiting on this query because my fix depends upon itπ . We need to address it before I raise the PR for the fix. Thanks.
Hi @chahmedejaz thank you for your work. Has there been progress to get an answer for that?
Hi @escoolioinglesias . It's finalized from my end for quite a while now. I'm just waiting on this query because my fix depends upon itπ . We need to address it before I raise the PR for the fix. Thanks.
Hi @berengard - Thanks for asking. We still need the answer to that question to move further.
Hi @berengard - Thanks for asking. We still need the answer to that question to move further.
Any idea who might have the answer?
Hi @berengard - Thanks for asking. We still need the answer to that question to move further.
Any idea who might have the answer?
I'm not sure as it's my first issue on this project π . However any dev who also manages the server can answer this.
Just a fast question beyond the gifs, is DISABLE_IMAGE_COMPRESSION working for anyone on other platforms like X?
I think this config is based upon the server/environment level, so it should be same for everyone and every platform.
Gotcha. Iβve tested it so-far and nothing seems to work for output. Not to commander anything; Iβve tried it for example on X with various ways to deal with the env flags; mainly based on if it was case sensitive and I found for a platform like X, when dealing with HEIC imagery, itβs still doing 1000x1000 max images, and wonβt properly rotate them.
I know the 1000 pixel limit is a code thing, since I recall Xβs limitation is by size (if I recall correctly 5MB) so that might also be something to look into. I would have done done fix, all I have is an understanding to a degree of the code but canβt really code that well. So it may be something to look at.