postiz-app icon indicating copy to clipboard operation
postiz-app copied to clipboard

⚠️ Media Upload Problem: GIFs posted or scheduled for LinkedIn are converted to static PNGs

Open escoolioinglesias opened this issue 6 months ago β€’ 18 comments

πŸ“œ 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

  1. Go to your LinkedIn channel
  2. Create a new post.
  3. Upload an animated GIF file as the media for the post.
  4. Write any accompanying text.
  5. Either 'Post now' or schedule the post for a future time.
  6. Once posted, view the post on LinkedIn.
  7. 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

escoolioinglesias avatar Jun 19 '25 02:06 escoolioinglesias

Hi @escoolioinglesias - I'd like to work on this bug, can you please assign it to me? Thanks.

chahmedejaz avatar Jun 23 '25 22:06 chahmedejaz

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!

escoolioinglesias avatar Jul 08 '25 14:07 escoolioinglesias

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.

vrisalab avatar Jul 15 '25 04:07 vrisalab

I'm experiencing the same problem, basically my .gif files are converted to .png. Would be great if this gets fixed.

CryptoAxiom avatar Jul 18 '25 13:07 CryptoAxiom

@chahmedejaz are you still available?

egelhaus avatar Jul 18 '25 14:07 egelhaus

Yes, @egelhaus - I'd love to work on it. πŸ™‚

chahmedejaz avatar Jul 18 '25 20:07 chahmedejaz

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.

chahmedejaz avatar Jul 27 '25 02:07 chahmedejaz

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

chahmedejaz avatar Aug 05 '25 14:08 chahmedejaz

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_COMPRESSION environment 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!

escoolioinglesias avatar Aug 27 '25 17:08 escoolioinglesias

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!

escoolioinglesias avatar Sep 23 '25 18:09 escoolioinglesias

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.

chahmedejaz avatar Sep 23 '25 20:09 chahmedejaz

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.

berengard avatar Oct 05 '25 07:10 berengard

Hi @berengard - Thanks for asking. We still need the answer to that question to move further.

chahmedejaz avatar Oct 05 '25 08:10 chahmedejaz

Hi @berengard - Thanks for asking. We still need the answer to that question to move further.

Any idea who might have the answer?

berengard avatar Oct 05 '25 12:10 berengard

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.

chahmedejaz avatar Oct 05 '25 12:10 chahmedejaz

Just a fast question beyond the gifs, is DISABLE_IMAGE_COMPRESSION working for anyone on other platforms like X?

Coasterghost avatar Oct 15 '25 09:10 Coasterghost

I think this config is based upon the server/environment level, so it should be same for everyone and every platform.

chahmedejaz avatar Oct 15 '25 09:10 chahmedejaz

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.

Coasterghost avatar Oct 17 '25 12:10 Coasterghost