Change the name and compress a picture before the user uploads it

Hi @edouardchene, just FYI…

Bubble has an out-of-the-box integration with the Imgix service / CDN, which automatically (and behind the scenes) optimizes publicly accessible images before they’re rendered on the page; so you needn’t concern yourself too much with file size from the standpoint of page load performance, because it’s not actually the originally uploaded image that gets served on the page - but rather an optimized and cached version generated by Imgix. (This old post explains it in a bit more detail, although the expense is less of an issue with Bubble’s recent reduction in file storage cost.)

Where file size should factor into your calculus is:

  • User experience
    Why have a user upload an image megabytes (or tens of megabytes) in size when all you really need is a high quality web image - not something intended to be output as a fine art print. Such excess file size adversely impacts the user experience (waiting for the upload to complete) and needlessly consumes bandwidth, which can be especially important for users uploading over a slow cell network. Instead, the image can be downsampled (scaled down) before uploading. That’s what Upload Buddy does.

  • File storage
    Needlessly large file uploads take up storage capacity. Even with the recent (and dramatic) reduction in the cost of Bubble file storage, why waste the space. Keeping uploaded images at a “sane” size helps you get the most out of the Bubble platform resources for which you’re paying.

Anyway, just wanted to share some thoughts. Good luck!

-Steve