Integrate TinyJPG API

Does anyone have any thoughts on how I might integrate the TinyJPG api with Cockpit? I’d like image assets to be automatically resized and compressed according to a specified configuration (a set of image sizes). There’s a WordPress plugin for reference, but I’m wondering what would be the most elegant way to add this to Cockpit (haven’t a clue how to create addons yet!).

FYI I am interested in this because of its far superior image quality and compression compared with GD.

Hey @wuh, the Image Styles addon (https://github.com/pauloamgomes/ImageStyles) could be a good candidate to include that (as an option) since it already provides some the configuration aspects (definition of image styles with sizes, etc…) but making use of Cockpit image manipulation functions (that are based on the claviska simpleimage library).
One doubt would be on the license aspects of TinyJPG.