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

Zammad expects hard coded content from Zammad-Image-Service #5161

Open
MrGeneration opened this issue May 3, 2024 · 1 comment
Open

Zammad expects hard coded content from Zammad-Image-Service #5161

MrGeneration opened this issue May 3, 2024 · 1 comment

Comments

@MrGeneration
Copy link
Member

Used Zammad Version

6.x (it really doesn't matter)

Environment

  • Installation method: any
  • Operating system (if you're unsure: cat /etc/os-release ): any
  • Database + version: any
  • Elasticsearch version: any
  • Browser + version: any

Actual behaviour

Avatars for users are hard coded to jpeg-images - but images.zammad.com does -currently- not convert images from e.g. png to jpeg. Plus, Gravatar delivers png images in all scenarious I've tested, even if you provide the .jpg extension.

https://github.com/zammad/zammad/blob/develop/lib/service/image/zammad.rb#L38-L41

Same applies for hardcoded png with organizations where images would accept jpg,png,gif,svg.

https://github.com/zammad/zammad/blob/develop/lib/service/image/zammad.rb#L74-L77

This may potentially break Avatars if browsers stop qualifying the mime type themselves and listen to the application (I did not verify if the actual image that is stored in Zammad is not corrected) and thus may require migrations to overcome this issue.

Expected behaviour

Zammad qualifies what mime type it receives from images (and/or) images starts to deliver exactly what's expected.

Steps to reproduce the behaviour

  • fetch avatars for users and check what you actually get
  • double tab by talking to images directly

Support Ticket

No response

I'm sure this is a bug and no feature request or a general question.

yes

@MrGeneration
Copy link
Member Author

Just verified that the Store of an affected Avatar that Zammad stores an PNG file with the mime_type jpeg.

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

1 participant