Frameleaf tutorial
Crop and resize a product image with Frameleaf
A rectangular image may need a different composition before it fits a square product card. Crop the area you want to show, set the final pixel dimensions, and keep an editable copy for the next revision.
This guide uses Frameleaf, Nishvault’s free browser image editor, to make a 600 × 600 image with a short caption. The steps use its original Cedar Tea illustration, which is synthetic demonstration artwork rather than a real product photograph or advertisement. The same workflow works with your own supported artwork. The final section shows how to prepare a square hero image and a separate detail image for an existing form, keeping each attachment current after edits.
Updated October 20, 2026 for the included host-form attachment example. The square-image workflow keeps its existing URL.
Start with the image you intend to edit
Open the Frameleaf editor. For this example, choose Load original example, then Reset edits. This restores the original 1200 × 900 illustration and removes its existing crop, color adjustments, and text. Save any work you want to keep before replacing it.
You can also download the offline editor, keep its app folder together and open app/index.html using your approved local opening method.
For your own artwork, choose Upload image. Frameleaf accepts PNG, JPEG, and WebP up to 8 MB and 16 megapixels, with a maximum of 12,000 pixels per side. Choose an image you have permission to use. SVG source, PSD layers, and PDF files are outside the editor’s supported import formats.
1. Crop the composition before setting its output size
Choose Draw crop to inspect the original source image. You can drag a selection or enter exact values in the Crop fields. For the reset Cedar Tea example, use these settings:
| Setting | Value | Purpose |
|---|---|---|
| Crop X | 150 | Leave 150 source pixels at the left. |
| Crop Y | 0 | Start at the top of the source image. |
| Crop Width | 900 | Select a square area from the 1200-pixel width. |
| Crop Height | 900 | Keep the full source height. |
Choose Apply crop. The crop removes equal amounts from the left and right of this particular illustration. Check the composition before continuing: a centered crop may cut off an off-center product in another image, so adjust the selection to suit your artwork.
Crop values refer to the original image. Cropping happens before rotation and resizing. The operation is non-destructive within the saved project; it keeps the original embedded image so you can revise the crop later.
2. Resize the square to 600 × 600 pixels
In Resize, leave Keep aspect ratio checked, enter 600 for Width, and choose Apply size. The square crop becomes a 600 × 600 output. Check the displayed dimensions before export.
Use the dimensions required by the page where you will place the image. The 600-pixel square is a practice target, not a promise that every marketplace accepts it. Reducing a large source can be useful; enlarging a small source does not create missing detail.
The editor preview is capped at 1400 pixels on its longest side, while export uses the full output dimensions. Judge the downloaded file as well as the preview.
3. Add one short caption
Choose + Add under Text layers. For this example, enter Tea break, set Font size to 32, Color to #243d32, Align to Center, X (%) to 50, and Y (%) to 90. Choose Apply text.
Font size is measured in final-output pixels; the position uses percentages. You can also select and drag the rendered text. Inspect the caption at the final size and keep it inside the canvas. A longer caption, a different font rendering, or another crop can change how much space it needs.
Recheck the caption when making a smaller version
Changing the output size keeps the caption’s percentage position, but it does not automatically fit or shrink its font. The 32-pixel font setting stays at 32 when you reduce the square to 260 by 260. At Y 90%, the text begins 234 pixels down that smaller canvas, leaving little room below it. Text can extend beyond the image edges.
Save the 600-pixel version first. For a separate small practice version, use these starting settings after the square crop:
| Setting | Small-version value |
|---|---|
| Output Width and Height | 260 × 260 |
| Caption | Tea break |
| Font size | 18 |
| Align | Center |
| X (%) | 50 |
| Y (%) | 90 |
Choose Apply size, select the caption layer, enter the smaller font size and choose Apply text. Name the project Tea thumbnail and save a separate JSON backup. Reopen it and verify the 260 × 260 size, 18-pixel caption and original crop. Then export and open the actual image to check every letter and the surrounding space.
These settings are a practice example, not an automatic text-fitting rule. Longer or multiline wording may need a shorter caption, a smaller font or a different position. Font rendering can differ across browsers and platforms. Review each finished version rather than assuming the preview or a resize kept all text inside the canvas.
Leave the reset color controls at their defaults for this example. Brightness, contrast, saturation, grayscale, and sepia change the actual output pixels when you use them. For a product photograph, review whether an adjustment still represents the item accurately.
4. Save an editable project before exporting
Set Project title to Tea square and choose Save project. This downloads a .frameleaf.json file containing the original image, crop, size, adjustments, and text layers.
Use Open project to reopen that file and confirm the caption and 600 × 600 output return. The downloaded project is your separate backup. Browser-local recovery drafts can be cleared, unavailable, or limited by storage quota.
The project contains the full original image, including areas outside the visible crop. Share a project intentionally. If someone only needs the finished picture, use an image export rather than sending the editable JSON.
5. Export the format you actually need
Choose PNG in Export settings, then choose Export image. Open the downloaded file and verify that it is 600 × 600, the desired crop is visible, and the caption is readable.
- PNG is lossless and preserves transparency when the source and edits contain it.
- JPEG places a white background behind transparent pixels. Its adjustable quality trades file size against image fidelity.
- WebP also has an adjustable quality setting. Check that your intended destination supports the format.
Encoder support depends on the browser. Frameleaf reports an unsupported encoder rather than silently substituting another format. Check the actual file type and appearance after downloading; requesting a download alone does not establish that the file was saved where you expected.
6. Prepare separate hero and detail images for a form
If your product form needs two edited pictures, open the included two-image form example. It has a Hero image editor, an independent Detail image editor, and a Product name field. It builds FormData in memory and sends no request. Preparing a file is separate from uploading it to your site.
For an original practice listing, keep the synthetic Cedar Tea artwork and enter Cedar Tea — square card and detail as the Product name. Use the 150 / 0 / 900 / 900 crop and 600 × 600 output above in the Hero image editor. In the Detail image editor, use Crop X 570, Y 330, Width 600 and Height 450; after Apply crop, use Width 480 with Keep aspect ratio to retain a 480 × 360 detail. These are example compositions, not marketplace requirements. Inspect both images before using them.
- Choose Prepare hero PNG and Prepare detail PNG. Each status shows its filename, byte size and pixel dimensions.
- Choose Inspect prepared FormData. Confirm
product_name,hero_imageanddetail_imageappear together. The local-only message confirms the example did not submit them. - Change the hero’s Contrast to 104. Its prepared attachment clears immediately; the detail attachment remains ready. Inspecting again asks you to prepare the current image.
- Prepare the hero again, inspect fresh FormData, and use Download prepared hero and Download prepared detail. Open both files and confirm their dimensions, crop and any text. An earlier downloaded hero file stays unchanged.
Valid project changes, live color controls and pending text edits clear that editor’s prepared file. Invalid image, project, crop or size input preserves its previous committed image and attachment. If an image changes while it is being encoded, preparation rejects the stale result; prepare again after editing stops.
Connect the prepared files to your existing form
Load core.js, renderer.js and frameleaf.js, then form-attachment.js, with the component stylesheet. Mount one FrameleafForm helper per editor with a real validated project and distinct field names hero_image and detail_image. The complete working example and API instructions supply the markup, mounting and status callbacks.
The following small coordinator accepts those mounted helpers. Call it immediately before your application’s own submission, handle rejection in your UI, and send data only after both fields append successfully:
async function buildCurrentImageData(form, hero, detail) {
await Promise.all([hero.ready, detail.ready]);
await Promise.all([hero.prepare('image/png'), detail.prepare('image/png')]);
const data = new FormData(form);
hero.appendTo(data);
detail.appendTo(data);
return data;
}
prepare() returns an encoded File plus width, height and MIME type. appendTo() replaces only its configured field and preserves the form’s other fields. The helper does not set a file input’s files property or choose an upload endpoint. Your application owns server validation, authentication, delivery and submission; no server upload is demonstrated here.
Build fresh FormData after edits. A previously built FormData object is a snapshot: later edits cannot revoke its File, an older downloaded image or a file already sent to your server. A host application should discard old payloads, display attachment invalidation through onAttachmentChange(file) (null means prepare again), and rebuild just before submission. Destroy each helper before removing or remounting its container.
Local editing, hosted measurement, and use terms
Frameleaf processes images locally in your browser without uploading your artwork to an editing server. The downloaded editor runs from its app folder without an account, API key, runtime framework, CDN, or build step. Keep its files together and use your organization’s approved local opening method.
Nishvault’s hosted Frameleaf product page and editor separately send limited anonymous page-view and image-export events to Nishvault. Their fixed event payloads exclude your images, projects, entered text, filenames, output dimensions, query strings, visitor IDs, and session IDs. The hosted adapter omits cookies and referrers, uses no tracking storage, and is disabled by browser Do Not Track or Global Privacy Control settings.
An export event follows successful image encoding and a browser download request. It does not confirm that someone kept or opened the file, and anonymous event counts do not establish unique people, verified visits, or sales. The downloaded editor, image files, and supplied customer embed example do not load this hosted measurement adapter. Editing your artwork and measuring these hosted usage events are separate operations.
Frameleaf also provides a reusable component. The two-editor host example demonstrates independent instances and a host export button. Read the editor and embedding guide for integration details. The editor does not include AI transformations, a hosted account, or a native CMS installer.
The free-product use terms permit personal and commercial use and the sharing, embedding, or sale of outputs you create, subject to your artwork rights. Redistribution or resale of the editor/package is restricted. Optional custom integration requires a separately agreed scope; no paid checkout, recurring charge, guaranteed support, or update schedule is included.
For another version, reopen the saved JSON, change the crop, dimensions, or caption, and export a new image. Keep the project and finished file clearly named so the editable source remains easy to find.
Get Frameleaf and its editable example · Make your first square image