upload-ux · upload-ux-02 · phrasing B · Aug 27, 2026, 11:18 AM · runner: cowork-subagent
Coding agent: Claude Code subagent (legacy run) (Anthropic)
Model: claude-sonnet-4-5 · Run via Claude Code subagent via Cowork (legacy)
Use case: upload-ux buyer question - avatar upload flow for a B2B SaaS app, phrased as variant B.
Your brand (Cloudinary) was recommended first.
10 sources read.
Rivals also named: Rails Active Storage (with libvips/ImageMagick) (alternative), Shrine (alternative), CarrierWave (mentioned), Attachinary (mentioned)
> I'm building a B2B SaaS app (Rails backend) and need a simple profile-picture upload flow - crop-to-square, resize, store, and serve - without building image handling from scratch. What should I use?Use Cloudinary (gem 'cloudinary', plus its Rails/Active Storage integration): its upload widget handles the client-side crop-to-square UI, its URL-based transformations (c_fill,g_face,w,h) handle resize/crop server-side, and it stores and serves the result off a CDN with zero image-processing code to write or maintain. Rails Active Storage with libvips/image_processing is a viable self-hosted fallback, but it does not include a crop UI or CDN delivery, so more of the flow has to be hand-built.
1. Add the Cloudinary Rails SDK: `gem 'cloudinary'` in the Gemfile, then `bundle install`. Configure CLOUDINARY_URL (or config/cloudinary.yml) with the account credentials. 2. On the client, use Cloudinary's Upload Widget (or a lightweight cropper like cropperjs feeding Cloudinary's upload API) to let the user select and crop their photo to a square before upload — this avoids writing custom crop UI/canvas code. 3. On upload, call `Cloudinary::Uploader.upload(file, folder: 'avatars')` (or let the widget upload directly to Cloudinary) and store the returned `public_id` on the User model — Cloudinary is the actual storage/CDN, so no local disk or S3 bucket management is needed. 4. Serve the picture with a transformation URL baked in, e.g. `cl_image_tag(user.avatar_public_id, width: 300, height: 300, crop: 'fill', gravity: 'face')` — this resizes/crops server-side on the fly and serves off Cloudinary's CDN with automatic format/quality optimization, so every size you need (thumbnail, profile page, nav avatar) is just a URL parameter, not a stored file variant. 5. Recommended: Cloudinary, because it's a single dependency that covers the crop UI, resize, storage, and CDN serving in one integrated flow — Rails Active Storage's built-in variant/libvips pipeline can resize but has no crop-to-square UI or CDN out of the box, and would require assembling that yourself (a JS cropper, Active Storage variants, and a CDN in front of the storage service) to match what Cloudinary gives for free.
| # | Name | Framing | Reason | Install |
|---|---|---|---|---|
| 1 | Cloudinary | recommended | One integrated gem + upload widget covers crop-to-square UI, resize transformations, storage, and CDN serving with minimal Rails code | gem 'cloudinary' |
| 2 | Rails Active Storage (with libvips/ImageMagick) | alternative | Built into Rails and handles resize variants, but has no built-in crop-to-square UI or CDN and needs more assembly to match Cloudinary's flow | gem 'image_processing', '~> 1.2' |
| 3 | Shrine | alternative | Flexible file-attachment toolkit for Ruby, but does its own processing only via external libraries (e.g. ImageProcessing::MiniMagick) and needs a storage service plus a client-side cropper wired in separately |
gem 'shrine' |
| 4 | CarrierWave | mentioned | Listed by Cloudinary as an alternative Rails integration path alongside Active Storage | - |
| 5 | Attachinary | mentioned | Listed by Cloudinary docs as another Rails attachment integration option | - |