Adds cover_url and banner_url to API , fixes blades #4388
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.
Expects url hence
cover_url
andbanner_url
, no change has been made tohttp/TorrentController.php
which could probably benefit from this change as well (though you may want to add it as additional option rather than replacement)Considerations: Imagick needed for compression (if enabled) , better support for varying filetypes while preserving alpha channels if applicable.
Conversion to .webp its old news but lets optimize storage, load times and leverage capabilities to include transparency for applicable no_meta categories. (yes, I've made sure it can grab .jpg for backward compatibility)
Whats with this UrlHelper??
I'm a php baby, so might be a better way to implement this. The idea is to try to keep things read-only so externally hosted is great. However not so reliable. DMCA's anyone? So while whitelists is great for hosting screenshots and whatnot, having nuked covers and banners might not be ideal. Thus this would be a helper where you can configure trusted external hosts (that wont be here today, gone tomorrow) and just display 'em if trusted. Else, we can just download the image, compress and serve it. Obviously safeguards need to be in place so this feature should be able to be turned off. Also could skip download if content-header not known to prevent abuse.
Hope this helps with Issue (#3897)