Downsamples images as requested by API clients

Andrew Dolgov 8e0d742cc4 disable play stamp for gifs 6 days ago
images 54b6df8f54 add missing image 1 week ago
README.md 1937049b8e af_api_resize -> api_resize_media 1 week ago
init.php 8e0d742cc4 disable play stamp for gifs 6 days ago

README.md

Resizes images as requested by API clients

Downsamples images if an API client requests the backend to do so. Useful for slow or unreliable network connections, i.e. mobile internet.

This plugin handles an additional parameter passed to getHeadlines or getArticle API calls:

  • resize_width (int) - target width (or height, plugin resizes based on a larger dimension)

Images are saved in a WEBP format.

Installation

Plugin assumes your tt-rss image cache (cache/images) is writable and GD library is available to PHP.

  1. git clone to plugins.local/api_resize_media and enable the plugin (preferences - plugins)
  2. Enable "downsample images" option in the API client (for example, tt-rss-android)

License

GPLv3