by InvaderFizz · 7y ago · 0 comments
This is a cool project and something I will probably use for some hobby projects.
I would caution against it for anything more than a hobby project as it violates the Cloudflare TOS:
> 2.8 Limitation on Non-HTML Caching
> The Service is offered primarily as a platform to cache and serve web pages and websites. Unless explicitly included as a part of a Paid Service purchased by you, you agree to use the Service solely for the purpose of serving web pages as viewed through a web browser or other application and the Hypertext Markup Language (HTML) protocol or other equivalent technology. Use of the Service for the storage or caching of video (unless purchased separately as a Paid Service) or a disproportionate percentage of pictures, audio files, or other non-HTML content, is prohibited.
https://www.cloudflare.com/terms/
For something small, they won't care. If your images make the front page of reddit, you might get shut down.
The main point of this article is to use a Cloudflare cache-everything rule and use that caching to create a free image host. From the article:
> I'd heavily recommend adding a page-rule to set the "cache level" to "everything", and "edge cache TTL" to a higher value like 7 days if your files aren't often changing.