Image Fill
Script for Adobe Illustrator
✦ Available exclusively on Patreon for Pro supporters.
ㅤ
Description
Image Fill places the same selected image inside one or more selected closed paths or compound paths in Adobe Illustrator. It automatically creates clipping-mask groups and provides live controls for image scale, rotation, position, opacity, blending mode, placement method, and preview display.
ㅤ
Features
Image Fill streamlines repetitive image-masking work while keeping placement and appearance easy to adjust. It supports individual selections, grouped artwork, and nested groups in one guided workflow.
- Multiple-object processing. Fills every valid selected closed path or compound path in a single run.
- Automatic clipping masks. Builds a separate clipping-mask result for every valid mask shape.
- Flexible file selection. Accepts an image chosen with Browse or entered directly into the image-path field.
- Linked or embedded placement. Keeps placed artwork linked to its source or embeds it into the Illustrator document.
- Original-path preservation. Optionally retains a copy of the original vector path beneath the clipped image.
- Proportional cover fitting. Scales each image to cover its target shape without distortion.
- Transform controls. Adjusts scale, rotation, horizontal offset, and vertical offset independently.
- Appearance controls. Adjusts image opacity and provides sixteen Illustrator blending modes.
- Live preview. Shows a reversible result while dialog settings are adjusted.
- Fit in Window. Centers and zooms the document view around the current selection.
- Hide Edges. Hides selection edges, anchor outlines, and the transform bounding box while keeping the artwork selected and editable.
- Quick resets. Restores individual controls with reset buttons or right-click slider shortcuts.
- Saved preferences. Remembers the image path, placement, transform, appearance, Preview, and Fit in Window settings.
ㅤ

ㅤ
Installation
1. Download the Image Fill.jsx script file.
2. Place the script in your Adobe Illustrator Scripts folder:
⮑ Mac: /Applications/Adobe Illustrator (Version)/Presets/(Language)/Scripts
⮑ Windows: C:\Program Files\Adobe\Adobe Illustrator (Version)\Presets(Language)\Scripts
3. Restart Adobe Illustrator if it's already running
4. Access the script via File > Scripts > Image Fill
5. Alternatively, run it directly via File > Scripts > Other Script... and browse to the file location
Tip: You can also drag and drop the .jsx file directly onto the Illustrator workspace to run the script instantly – no installation needed.
ㅤ
ㅤ
Using the Script
ㅤ
Prepare and Select the Artwork
Select the vector shapes that will act as image masks before opening the dialog. The script processes each valid mask separately.
- Select one or more closed paths.
- Select compound paths when several subpaths should act as one clipping shape.
- Select a group containing multiple paths or compound paths to process all valid children at once.
- Select parent groups when valid artwork is stored inside nested groups.
- Open paths are skipped and reported after processing.
- Unsupported objects are skipped without preventing valid objects in the same selection or group from being processed.
ㅤ
ㅤ
➊ Launch the Script
Open the script after preparing an Illustrator document with the artwork you want to fill.
- Run it from File > Scripts > Image Fill when installed in the Scripts folder.
- Run it from File > Scripts > Other Script... when stored elsewhere.
- Drag and drop the JSX file onto the Illustrator workspace to launch it directly.
- If no document is open, the script prompts you to open one.
- If no valid artwork is selected, the script asks you to select at least one closed path or compound path.
ㅤ

ㅤ
ㅤ
➋ Choose the Source Image
Use the Image File section to choose the file placed into every valid selected shape.
- Click Browse... and select a supported image or artwork file, or enter its path directly in the field.
- Press Enter or leave the field after typing a path so the script can validate it.
- Confirm that the selected file path appears in the field.
- Use the ✖ button beside the field to clear the current image when needed.
The entered image path is remembered for the next run. If the file still exists, the script loads it automatically.
ㅤ
ㅤ
➌ Select the Placement Method
Use the Image Placement Method section to control how the placed file is stored and whether the original vector appearance is preserved.
- Place linked keeps each placed image connected to the source file on disk.
- Embed after placing stores the image content inside the Illustrator document after placement.
- Keep original path preserves a copy of the original vector path beneath the clipped image.
- Use linked placement for an external asset workflow and potentially smaller Illustrator files.
- Use embedded placement when the Illustrator document must remain self-contained.
ㅤ
ㅤ
➍ Adjust Scale, Rotation, and Position
Use the transform controls in the Options section to position the image inside each clipping mask. With Preview enabled, each completed change refreshes the result.
- Scale to container changes the image size relative to the automatic cover fit.
- A scale of 100% uses the calculated cover size.
- Values below 100% zoom out, while values above 100% zoom in.
- Image rotation rotates the image around its center and adjusts the cover calculation for the selected angle.
- Horizontal offset moves the image left or right in Illustrator points; positive values move it right.
- Vertical offset moves the image up or down in Illustrator points; positive values move it up.
ㅤ
The sliders provide practical working ranges, while their numeric fields accept broader values where Illustrator permits them.
- The Scale slider covers 10% to 300%; typed scale accepts any positive integer percentage, including values outside that range.
- The Rotation slider covers -180° to 180°; typed rotation accepts integer angles outside that range.
- The offset sliders cover -1000 pt to 1000 pt; typed offsets accept integers outside that range.
- When a typed value exceeds a slider range, the field keeps the value and the slider rests at the nearest endpoint.
- Click the ✖ beside a transform control or right-click its slider to restore the default value.
ㅤ

ㅤ
➎ Adjust Opacity and Blending
Use the appearance controls to change the transparency and blending behavior of the placed image.
- Image opacity accepts values from 0% for fully transparent to 100% for fully opaque.
- Blending mode controls how the placed image interacts with artwork below it.
- Available modes are Normal, Multiply, Screen, Overlay, Soft Light, Hard Light, Color Dodge, Color Burn, Darken, Lighten, Difference, Exclusion, Hue, Saturation, Color, and Luminosity.
- Hover over the Blending mode text label to highlight it in blue.
- Click the Blending mode label to select the next dropdown option.
- Clicking after Luminosity cycles the dropdown back to Normal.
- Click the ✖ beside the blending-mode dropdown to restore Normal.
ㅤ

ㅤ
➏ Control the Preview and Document View
The controls below the Options section help you inspect the image fill without changing the active selection.
- Preview shows a temporary live result using the current dialog settings.
- Turn Preview off to undo the temporary result and show the original artwork again.
- Fit in Window centers and zooms the document view around the current selection.
- Turn Fit in Window off during the dialog session to restore the view captured when the dialog opened.
- Hide Edges hides blue selection edges, anchor outlines, and the transform bounding box.
- Hide Edges remains enabled by default each time the dialog opens and is not stored as a preference.
ㅤ
ㅤ
➐ Apply or Cancel the Image Fill
Review the preview and complete the operation when the image placement looks correct.
- Confirm the image file, placement method, transform values, opacity, and blending mode.
- Click OK to keep the current preview as the final result.
- If Preview is disabled, click OK to apply the current settings after the dialog closes.
- Click Cancel to undo the temporary preview and close the dialog without applying the image fill.
The script restores selection edges and the transform bounding box on OK, Cancel, or dialog-close cleanup when it hid them during the current session.
ㅤ
ㅤ
➑ Review the Final Result
Every valid mask produces its own image-filled clipping group while preserving the selected group hierarchy where applicable.
- Each image is proportionally fitted, transformed, styled, and clipped by its corresponding mask.
- Linked mode retains the source-file connection.
- Embedded mode stores the image content inside the Illustrator document.
- Keep original path places a preserved path beneath the clipped image result.
- Resulting image-fill groups are selected after successful processing.
- Invalid and open objects remain unprocessed.
- A completion message reports the number of unsupported or open items that were skipped.
ㅤ
ㅤ
☻ Wrap-Up
Image Fill turns a repetitive clipping-mask workflow into a guided process for individual shapes, multiple selections, and grouped artwork. Its live transform and appearance controls, flexible placement options, preview tools, and selection-chrome management make image-filled vector compositions faster to build and easier to refine.
ㅤ
ㅤ