No strip image metadata works for PNG but not 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 Likes

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

3 Likes

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 Like

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 Like

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 Likes

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.

3 Likes