Add an Image Cropper to your Bubble site
Add an image cropper to your Bubble site and set image requirements like crop aspect ratio and image target size. Use CropGuide and receive better images.
Integrating an image cropper into your Bubble app lets users adjust their photos before uploading, minimizing the need for you to tweak images later.
This guide helps you set up CropGuide to enhance the existing Bubble file upload field with image cropping functionality.
Installing CropGuide
To get started we first need to create a CropGuide account
Log in to CropGuide and add your domain to the control panel.
The control panel will generate a unique id for your domain: ABCDEF
With your CropGuide account created log in to Bubble.
-
Open the CropGuide Plugin page
-
Click “Install in an application”
-
Select the app you want to add CropGuide to
-
On the plugin settings page copy your unique id to the API KEY field.
That’s it, CropGuide now loads on your Bubble pages.
Test it out by opening a page with a file input and selecting an image.
Load CropGuide on specific file input elements only
To limit CropGuide to only a subset of file input elements we can set the CONFIG text box to a field configuration.
Before we do this it’s handy to be able to assign ID’s to our design elements.
-
Navigate to Settings and then General. Scroll to the General appearance section.
-
Now put a checkmark in: “Expose the option to add an ID attribute to HTML elements”
-
Goto Design and select a file upload field. Scroll to the end of the element Appearance tab.
-
Type a name in the “ID Attribute” field, for example: “my-field”
Now to limit CropGuide to this field, copy paste the code below to the “FIELD CONFIG” field on the plugin configuration page. Note that we’ve prefixed the ID field with a “#” symbol.
$cropguide.push(['set', 'fields', ['#my-field']]);
That's it! CropGuide will now load and transform images when they're added to a file upload field on your Bubble page.
You can adjust the behavior of CropGuide in the control panel for your domain, or you can set custom instructions per field.
Please feel free to reach out to us if you have any questions.
Related content
- Crop PAN Card Photos Before Upload on Bubble
- Crop Cédula Photos Before Upload on Bubble
- Crop Identity Card Photos Before Upload on Bubble
- Crop Aadhaar Card Photos Before Upload on Bubble
- Crop Passport Document Photos Before Upload on Bubble
- Crop Circular Profile Pictures on Bubble
- Convert HEIC/HEIF to JPEG Before Upload on Bubble
- Compress User Images Before Upload on Bubble
Our photo editing technology is trusted by amazing companies
Frequently Asked Questions
-
How can users crop photos before uploading them in a Bubble app?
Add an image editor to your existing Bubble file upload field with the CropGuide plugin. Users crop their photos in the browser before the edited file reaches the uploader. Follow the Bubble installation steps.
-
Do I need to rebuild my Bubble upload form to add image editing?
No. The CropGuide plugin enhances existing file upload fields. Install the plugin and enter the unique ID from your CropGuide control panel in its API KEY setting; your app keeps its existing upload flow.
-
Can I require square photos or a minimum image size for Bubble uploads?
Yes. Configure a square aspect ratio or minimum image dimensions for the upload field in your CropGuide dashboard. Minimum image size is available on Pro and Unlimited plans. See the configuration options.
-
How can I add image cropping to just one file uploader in Bubble?
Give the file input an ID in Bubble, then target that ID in the CropGuide plugin’s FIELD CONFIG setting. Other upload fields will not trigger the editor. See the field targeting steps.