Cloudflare Images vs Cloudflare R2 for storing & serving images and attachments?

tlghnb

Member
Hey everyone,

I saw these 2 products from Cloudflare which seems like great products especially for XenForo forums. Has anyone ever used one of these or both in their forums so far?

I haven't compared the pricing but using Cloudflare Images for storing and serving images and Cloudflare R2 for storing and serving attachments seems like a great setup in theory especially when combined with Cloudflare's caching, you'll only pay for storage fees and serving will theoretically be unlimited and free plus you get the speed benefits of Cloudflare's worldwide network and basically remove almost all of the load from your server and dump it to Cloudflare. All of these by paying a fraction, even for the largest forums.

What do you guys think?
 

This is a must if you are looking at R2 storage :)
 
That’s funny, I thought you were talking about R2 storage, so I shared something to save you reinventing the wheel.

People are already at least partly doing what you are suggesting.

🙄🙄
 
That’s funny, I thought you were talking about R2 storage, so I shared something to save you reinventing the wheel.

People are already at least partly doing what you are suggesting.

🙄🙄
Sorry I didn't mean to be mean. :D

It's just that I was mostly interested in discussing about this setup and how beneficial would it be and also compare R2 and Images for cost-efficiency. That add-on is for basically building this setup if one decides to go with this route but that's not the topic of this discussion.

If I were to go with this route, I could use that add-on so thank you for that suggestion but again, that's not the topic of this discussion. I'm not asking how to set it up. :D
 
Images ends up being a lot more expensive and in my opinion not that much of a benefit to XenForo installations. Images is more designed for sites that have a single image and they aren’t serving different sized images based on the need of the user or the layout of the page. XenForo already resizes images and serves the appropriate size. Images can reformat images on the fly (like output WebP versions of your jpeg or png images on the fly), so that’s nice. However the cost involved to do that isn’t worth it imo (you are paying for each image request).

R2 is fantastic for XenForo, the fact that you can offload your storage to the cloud and not worry about backups and all that for a crazy cheap price (for example it’s $1.35 per month as the total cost for 100GB worth of files).

TL;DR
Images isn’t as great of a benefit with XenForo vs other sites and you need to pay per http request for it.
 
TL;DR
Images isn’t as great of a benefit with XenForo vs other sites and you need to pay per http request for it.
What are the preferred sites for images and can you consider your add-on to point image storage to alternate cloud options? Or a separate add-on for cloud image storage options?
 
What are the preferred sites for images and can you consider your add-on to point image storage to alternate cloud options? Or a separate add-on for cloud image storage options?
A site that doesn't already do image optimization on it's backend. My addon has nothing to do with other cloud providers, if you want to use S3, this one does it (although I don't have any experience with it myself):

 
Images ends up being a lot more expensive and in my opinion not that much of a benefit to XenForo installations. Images is more designed for sites that have a single image and they aren’t serving different sized images based on the need of the user or the layout of the page. XenForo already resizes images and serves the appropriate size. Images can reformat images on the fly (like output WebP versions of your jpeg or png images on the fly), so that’s nice. However the cost involved to do that isn’t worth it imo (you are paying for each image request).

R2 is fantastic for XenForo, the fact that you can offload your storage to the cloud and not worry about backups and all that for a crazy cheap price (for example it’s $1.35 per month as the total cost for 100GB worth of files).

TL;DR
Images isn’t as great of a benefit with XenForo vs other sites and you need to pay per http request for it.
That makes sense. Thank you!
A site that doesn't already do image optimization on it's backend. My addon has nothing to do with other cloud providers, if you want to use S3, this one does it (although I don't have any experience with it myself):

I've set this up this myself on Scaleway's Object Storage before. It was easy to setup actually even though the guide only mentions about DigitalOcean Spaces or Amazon's S3.

Your add-on seems like an all-in-one solution for those who are using Cloudflare for everything (which I do for all of my websites) which is nice.
 
That makes sense. Thank you!

I've set this up this myself on Scaleway's Object Storage before. It was easy to setup actually even though the guide only mentions about DigitalOcean Spaces or Amazon's S3.

Your add-on seems like an all-in-one solution for those who are using Cloudflare for everything (which I do for all of my websites) which is nice.
Ya, you can use R2 without my addon since it's S3 compatible, but you don't get some of the more advanced options I built that are specific to my addon:
  • Automatic config of everything (there are no config.php edits needed)
  • Automatic setup of XenForo appropriate Cloudflare cache rules for your public R2 bucket
  • Ability to be more granular with storage (instead of an all or nothing approach, you can have certain directories be cloud storage and others not). For example storing most of the directories in internal_data in the cloud doesn't make a lot of sense... encryption keys you need to read every time you send an email, caches, etc.
  • Made underlying changes to XenForo's abstracted file system to support the sub-directories above, as well as made a change so the abstracted filesystem isn't making 2 API calls to fetch objects (normally XenForo first goes out to see if it exists before it tries to fetch it... not terribly efficient for cloud storage).
 
A site that doesn't already do image optimization on it's backend. My addon has nothing to do with other cloud providers, if you want to use S3, this one does it (although I don't have any experience with it myself):

Maybe a dumb question, but after enabling R2 with your plugin, how do I move all of the current data there?
 
Maybe a dumb question, but after enabling R2 with your plugin, how do I move all of the current data there?
You can do it with whatever tool you want that moves data to/from S3 compatible providers (for example rclone), or use the CLI tool the addon comes with.

See this post:

 
You can do it with whatever tool you want that moves data to/from S3 compatible providers (for example rclone), or use the CLI tool the addon comes with.

See this post:

Thank you, one last question... how do you know it's using the data from that location once the data has been migrated?
 
Upload something new and see if it lands in your R2 bucket or S3 bucket. Also, if you are worried about it, at that point you could take out the S3 stuff from your config.php and see if you can still access attachments (it’s definitely not getting them from S3 if you remove the S3 config info).
 
You can do it with whatever tool you want that moves data to/from S3 compatible providers (for example rclone), or use the CLI tool the addon comes with.

See this post:


If I'm reading thus correctly I could use your CLI tool to move my images from my site to icloud?
 
If I'm reading thus correctly I could use your CLI tool to move my images from my site to icloud?
Yep... To the cloud (and more specifically Cloudflare R2), not icloud though just so there's no confusion (iCloud is an Apple thing... probably a typo.)
 
Top Bottom