Skip to content

Use PNG screenshots for Discourse compatibility#64

Closed
ieduer wants to merge 1 commit intodiscourse:mainfrom
ieduer:main
Closed

Use PNG screenshots for Discourse compatibility#64
ieduer wants to merge 1 commit intodiscourse:mainfrom
ieduer:main

Conversation

@ieduer
Copy link
Copy Markdown

@ieduer ieduer commented Dec 5, 2025

Summary

This PR updates the Mint theme's screenshots to use PNG files so they comply with Discourse's current theme screenshot requirements.

Background

In about.json, the theme previously referenced:

"screenshots": [
  "screenshots/light.webp",
  "screenshots/dark.webp"
]

However, Discourse only accepts jpg, jpeg, gif, or png as valid screenshot formats for themes. When installing or updating the theme via /admin/customize/themes, this results in an error like:

The theme screenshots must be in one of the following formats: .jpg, .jpeg, .gif, .png. The screenshot light.webp has an invalid format.

Changes
• Added screenshots/light.png converted from light.webp
• Added screenshots/dark.png converted from dark.webp
• Updated about.json:

"screenshots": [
  "screenshots/light.png",
  "screenshots/dark.png"
]

Testing
• Installed/updated the theme from this branch on a Discourse instance
• Confirmed the invalid screenshot format error no longer appears
• Verified that the screenshots display correctly in the admin UI

Copy link
Copy Markdown
Contributor

@martin-brennan martin-brennan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit confusing, we actually recently added webp support:

https://github.com/discourse/discourse/blob/409f4d1b0d0882f4a21fa46c98c938e900e43959/lib/theme_screenshots_handler.rb#L7-L7

So the theme can stay as is.

@cvx
Copy link
Copy Markdown
Contributor

cvx commented Dec 11, 2025

@martin-brennan that was because this theme (and a few others) was missing a .discourse-compatibility entry so webp images broke for those not on the latest commit version of core. I added those entries so this can be closed now 👍

@cvx cvx closed this Dec 11, 2025
@martin-brennan
Copy link
Copy Markdown
Contributor

@cvx thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants