Building an Image Upload System for Shopify Form Design

Custom images can make storefront forms feel more aligned with a merchant's brand.
A form builder may need images for several design purposes, including backgrounds, side images, and individual option images. Supporting these use cases requires an upload workflow that connects the builder interface with backend storage.
Image upload use cases
The design image upload feature supports three image contexts:
- Form background: An image used as the background of a form.
- Side image: An image displayed alongside the form content.
- Option image: An image associated with an individual form option.
These use cases allow merchants to customize the appearance of their forms beyond basic colors and typography.
The upload workflow
A typical image upload flow involves the following steps:
- The merchant selects an image in the form builder.
- The builder initiates the
upload-imageaction. - The backend validates the uploaded file.
- The application uploads the image to Amazon S3.
- The application records the uploaded file.
- The builder receives the result and can use the image in the form design.
This separates the design interface from the storage implementation.
Using Amazon S3 for image storage
The feature uses AWS S3 through the @aws-sdk/client-s3 package.
Uploaded objects use a key structure beginning with:
form-builder/{shop}/...
Organizing objects by shop provides a useful storage boundary for a multi-tenant Shopify application.
It also makes it easier to identify which merchant's storage an uploaded image belongs to.
Recording uploaded files
The implementation also uses a FileUpload record.
This gives the application a database-level record of an uploaded file rather than relying only on the existence of an S3 object.
The specification also identifies a legacy storage counter, which is relevant to tracking storage usage.
Why storage limits matter
Image uploads consume storage and may increase operational costs.
The feature is plan-gated using two dimensions:
- Maximum size per file
- Total storage allowance
These limits allow different subscription plans to have different upload allowances.
Conclusion
Image uploads are an important part of a customizable form builder. By supporting background, side, and option images through a backend upload workflow and S3 storage, merchants can create more visually distinctive forms.
Explore Cruxtab Contact Form Builder for Shopify storefront form-building functionality.
Comments
Join the discussionNo comments yet. Be the first to comment.




