PNG에서는 작동하지만 JPG에서는 작동하지 않는 메타데이터 제거 기능

On this site:

I have the following File settings:

  • strip image metadata = UNCHECKED
  • png to jpg quality = 100  (thereby disabled)

I use ExifTool to set and read image metadata.

The metadata survives intact on my PNG uploads but not on my JPG uploads. And I believe this to be a bug.

Here is a PNG to check:

And a JPG to check:

But you should perform your own tests. And this should not be much work. HTH R

2개의 좋아요

I gotta update the copy on that strip image metadata to warn about this.

3개의 좋아요

Many thanks, @Falco. I need to explore this this evening. Discourse could perhaps go further and feature a popup or even a message if counteracting or counterintuitive settings are being made by admins?

1개의 좋아요

We have a system where we can prevent contradictory settings from being toggled. Will leave this bug open so we can address this.

I just set the following parameter as suggested. And left the earlier settings as indicated above:

  • composer media optimization image enabled = UNCHECKED

And the problem seems to persist. I changed the EXIF data and filename and MD5 sum so there could be no memory in discourse, I imagine.

The site is also very close to its initial install, so most defaults persist. Any suggestions most welcome?

Have you refreshed the page after toggling it?

1개의 좋아요

No, but I cannot try that right now. Thanks though.

@Falco Indeed refreshing my browser tab worked after updating the settings! It also seemed that the upload was considerably slower. And the downloaded file — with the metadata fully intact — was 10× the size when compared to previous iterations. All that makes sense, of course.

I realize that there are different use‑cases in play. The default behavior is useful for forums that are social in nature. But my application is to support science and research. And it is better that users make decisions about the appropriate format, resolution, and metadata for their various uploads. And that discourse simply passes the files through uncontaminated.

Given that there are logical bundles of settings, perhaps some kind of higher level configuration or interpretation would be useful?

Again, thanks for your support. And I guess you saw this recent posting too, regarding configuration hints:

Best, R

3개의 좋아요

Here is a screenshot of the bundle of settings that prevents discourse from messing with uploaded files:



And don’t forget to refresh your browser tab too, to purge any client‑side functionality that might be present but no longer required.

https://github.com/discourse/discourse/pull/16662

4개의 좋아요