Add image processing and generate blurhash for server thumbnail #19348
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The 1200x630px size or even the format has not been enforced before. Turns out you cannot trust server admins not to upload gigantic TIFF images into the server thumbnail setting even if the hint says that the 1200x630px size is recommended. To be honest, there is nothing surprising or even outrageous about it, the surprising part is that 2017-me believed otherwise. Now we will generate web-friendly variants specifically for the thumbnail as well as a blurhash value to handle loading placeholders.
Remove separate server hero setting. Not a lot of sense in keeping the hero and thumbnail as separate settings when I would wager they should be the same in most cases. Reason for keeping thumbnail over hero is that the hero setting has never been exposed in the API. Through the API, the thumbnail appears on the servers list on joinmastodon.org, in the official mobile apps, and possibly other third-party apps, so it has more reach than the hero. Related: #19345
In
GET /api/v2/instance
, thethumbnail
property becomes: