Skip to main content

Anyway to compress images automatically before upload to Cloudflare R2 ro save storage cost? Auto convert to avif 82% 1200px max as example.

I don't want member abuse by uploading tons of original images 2-3 MB per image.

Mat β€Ž

Adding link to request where Admin could specify max file size - not everybody might want to use external sevices so its good to manage it in some way

Limit max file size (Pro) for attachments and limit file extension for attachments (make sure we dont accept any executable files including .js .htaccess etc).

We could also limit max number of files to be attached per day/month (Pro). By default max: 20 attachments should be enough for the user (excluding Admin/Manager) so users won't eat up our server storage over night.

Mat β€Ž

I think optimizing image before uploading them to R2 would be great so we can avoid Cloudflare Images (Paid) where we can store, transform, optimize and deliver image.

Note: R2 is just an object storage bucket and it doesnt offer image transformations.

I wish to have also presigned URLs for R2 (presigned URLs for S3) so all files are not accessible from public rather than only by our WP instance (if attachments "Privacy" matter).

Shahjahan Jewel

FluentCommunity compress and resize and convert to webp before save to the R2 or Local storage

Wilco

Shahjahan Jewel,you could also think about a out expire function. Say for topics that didnt have any fews in X days/months

Cuong Thach

Shahjahan Jewel, Wow, it is great