Custom Text Personalization
Custom Text lets your customers add personalized text — names, dates, quotes, and more — to their AI-generated designs. When enabled on a style, a text input appears on the product page and the customer's input is woven into the AI prompt at generation time.
Overview
The feature has two sides:
- Admin configuration — you pick a text type, set validation rules, and write a prompt template that includes the
{{CUSTOM_TEXT}}placeholder. - Storefront experience — the customer sees a labeled input field, types their text, and the AI uses it when generating the design.
Prerequisites
- Autopictura app installed and at least one AI style created
- Access to the Autopictura admin panel
Enabling Custom Text on a Style
- Open the Autopictura admin and navigate to the style you want to edit.
- Scroll to the Custom Text Input section (marked with a BETA badge).
- Toggle Enable Custom Text Input on.
- Choose a Text Type from the dropdown (see Available Text Types below).
- Optionally toggle Text is Required — when enabled, customers must enter text before they can generate.
- Set the Maximum Character Length (1–500, default 50).
- Write a Prompt Template with Custom Text that includes the
{{CUSTOM_TEXT}}placeholder. - Save the style.
The {{CUSTOM_TEXT}} Placeholder
When a customer enters text and clicks generate, Autopictura replaces {{CUSTOM_TEXT}} in your prompt template with the sanitized customer input. If the customer leaves the field empty (and it isn't required), the regular prompt template is used instead.
How It Works
Each style can have two prompt templates:
| Template | Used when |
|---|---|
| Prompt Template (standard) | No custom text provided, or custom text is disabled |
| Prompt Template with Custom Text | Customer entered text and the style has custom text enabled |
The placeholder is a simple find-and-replace: {{CUSTOM_TEXT}} → the customer's input after sanitization.
Example Prompt Templates per Text Type
Below are example prompt templates for every text type. Each one uses {{CUSTOM_TEXT}} where the customer's input will appear.
Child's Name
A whimsical watercolor portrait of a child with the name "{{CUSTOM_TEXT}}" written in playful hand-lettered typography, soft pastel colors, nursery art style
Baby's Name
A gentle newborn announcement artwork featuring the name "{{CUSTOM_TEXT}}" in elegant calligraphy, surrounded by soft florals and stars, dreamy pastel palette
Pet's Name
A charming illustrated pet portrait with the name "{{CUSTOM_TEXT}}" in a decorative banner below, vibrant colors, playful cartoon style
Couple Names
A romantic artwork with "{{CUSTOM_TEXT}}" intertwined in elegant script, floral accents, wedding invitation style, gold and blush tones
Family Name
A warm family crest-style illustration featuring "{{CUSTOM_TEXT}}" in a classic serif font, ornamental frame, vintage earth tones
Special Date
A commemorative artwork with the date "{{CUSTOM_TEXT}}" displayed in a timeless typographic layout, minimalist design, anniversary keepsake style
Location
A stylized travel poster-inspired illustration of {{CUSTOM_TEXT}}, vibrant retro color palette, vintage tourism art style
Quote
A beautifully typeset artwork featuring the quote "{{CUSTOM_TEXT}}" in modern calligraphy, decorative flourishes, inspirational wall art style
Initials
A sophisticated monogram design featuring the initials "{{CUSTOM_TEXT}}" in an ornate interlocking style, gold foil effect, luxury brand aesthetic
Title
A bold artwork with the title "{{CUSTOM_TEXT}}" in striking display typography, modern poster design, high contrast colors
Custom Text (generic)
An artistic design incorporating the text "{{CUSTOM_TEXT}}" in a creative typographic layout, balanced composition, contemporary art style
Nickname
A fun and playful artwork featuring the nickname "{{CUSTOM_TEXT}}" in a comic-style speech bubble, bright colors, pop art aesthetic
Occasion
A festive celebration artwork for {{CUSTOM_TEXT}}, confetti and ribbons, joyful color palette, party invitation style
Year
A retro-inspired year artwork featuring "{{CUSTOM_TEXT}}" in bold vintage block letters, nostalgic color scheme, yearbook cover style
Message
A heartfelt greeting card design with the message "{{CUSTOM_TEXT}}" in elegant handwriting, watercolor background, warm and inviting
Dedication
A touching tribute artwork with the dedication "{{CUSTOM_TEXT}}" in graceful italic script, subtle vignette, memorial keepsake style
Memory
A nostalgic scrapbook-style illustration with "{{CUSTOM_TEXT}}" in a vintage typewriter font, polaroid frame, sepia-toned accents
Team Name
A dynamic sports-inspired logo design with "{{CUSTOM_TEXT}}" in powerful athletic lettering, bold team colors, championship banner style
Company Name
A professional corporate artwork featuring "{{CUSTOM_TEXT}}" in clean modern sans-serif typography, business branding style, sleek and minimal
Slogan
A motivational poster design with the slogan "{{CUSTOM_TEXT}}" in impactful display typography, gradient background, rally cry aesthetic
Available Text Types
When you enable Custom Text on a style, you choose a Text Type. This controls the label customers see, the placeholder hint in the input field, and helps communicate what kind of text is expected.
| Text Type | Admin Label | Storefront Label | Placeholder |
|---|---|---|---|
child_name | Child's Name | Enter child's name | e.g., Emma |
baby_name | Baby's Name | Enter baby's name | e.g., Oliver |
pet_name | Pet's Name | Enter pet's name | e.g., Max |
couple_names | Couple Names | Enter couple names | e.g., John & Jane |
family_name | Family Name | Enter family name | e.g., The Smiths |
special_date | Special Date | Enter special date | e.g., 12.25.2024 |
location | Location | Enter location | e.g., Paris, France |
quote | Quote | Enter quote | e.g., Live, Laugh, Love |
initials | Initials | Enter initials | e.g., JD |
title | Title | Enter title | e.g., Best Dad Ever |
custom_text | Custom Text | Enter custom text | Enter your text |
nickname | Nickname | Enter nickname | e.g., Buddy |
occasion | Occasion | Enter occasion | e.g., Birthday 2024 |
year | Year | Enter year | e.g., 2024 |
message | Message | Enter message | e.g., Happy Birthday! |
dedication | Dedication | Enter dedication | e.g., For Mom |
memory | Memory | Enter memory | e.g., Summer 2024 |
team_name | Team Name | Enter team name | e.g., The Eagles |
company_name | Company Name | Enter company name | e.g., Acme Inc. |
slogan | Slogan | Enter slogan | e.g., Dream Big |
Field Position
The custom text input can be placed either above or below the image upload area. This is configured in two places:
- Theme Editor — go to Theme Settings → App Embeds → Autopictura Extension and change the Custom text field position setting.
- The position applies to all styles that have custom text enabled.
Special Characters Handling
Emojis and special Unicode characters often don't render well in AI-generated images. The theme extension provides two modes, configurable in the Shopify theme editor under the Autopictura extension settings:
| Mode | Behavior |
|---|---|
| Allow (warn) | Characters are kept, but a warning message appears telling the customer they may not render correctly. |
| Block | Emojis and special characters are automatically stripped from the input. |
Text Sanitization
All custom text input is sanitized server-side before being sent to the AI model. The following are automatically removed:
- Control characters (U+0000–U+001F, U+007F–U+009F)
- Zero-width characters (U+200B–U+200F, U+202A–U+202E, U+FEFF)
- Null bytes
- Multiple consecutive spaces (collapsed to single space)
Empty or whitespace-only input is treated as no text provided.
Translations
The custom text UI is fully translated into six languages. The storefront automatically detects the customer's language from the Shopify locale and falls back to the browser language, then to English.
Supported Languages
| Key | English (en) | Dutch (nl) | German (de) | French (fr) | Hungarian (hu) | Romanian (ro) |
|---|---|---|---|---|---|---|
customText | Custom text | Aangepaste tekst | Benutzerdefinierter Text | Texte personnalisé | Egyéni szöveg | Text personalizat |
enterCustomText | Enter your text | Voer je tekst in | Geben Sie Ihren Text ein | Entrez votre texte | Írd be a szöveged | Introdu textul tău |
customTextRequired | Text is required | Tekst is verplicht | Text ist erforderlich | Le texte est requis | A szöveg kötelező | Textul este obligatoriu |
optional | (optional) | (optioneel) | (optional) | (optionnel) | (opcionális) | (opțional) |
required | (required) | (verplicht) | (erforderlich) | (requis) | (kötelező) | (obligatoriu) |
charactersRemaining | characters remaining | tekens over | Zeichen übrig | caractères restants | karakter maradt | caractere rămase |
specialCharsMayNotRender | Special characters may not render correctly | Speciale tekens worden mogelijk niet correct weergegeven | Sonderzeichen werden möglicherweise nicht richtig angezeigt | Les caractères spéciaux peuvent ne pas s'afficher correctement | A speciális karakterek esetleg nem jelennek meg helyesen | Caracterele speciale pot să nu fie afișate corect |
specialCharsNotSupported | Special characters are not supported | Speciale tekens worden niet ondersteund | Sonderzeichen werden nicht unterstützt | Les caractères spéciaux ne sont pas pris en charge | A speciális karakterek nem támogatottak | Caracterele speciale nu sunt acceptate |
How Locale Detection Works
- The storefront checks
window.Shopify.locale(e.g.,nl-NL,en-US). - The language portion is extracted (
nl,en). - If a translation exists for that language, it's used.
- Otherwise the browser's
navigator.languageis checked. - If neither matches, English is used as the fallback.
CSS Customization
All custom text elements use namespaced CSS classes that you can override in your theme:
| Class | Element |
|---|---|
.autopictura-custom-text-section | Outer container |
.autopictura-custom-text-section--above | Position modifier (above image upload) |
.autopictura-custom-text-section--below | Position modifier (below image upload) |
.autopictura-custom-text-section--error | Error state on the container |
.autopictura-custom-text-label | The label element |
.autopictura-custom-text-input | The text input field |
.autopictura-custom-text-input--error | Error state on the input |
.autopictura-custom-text-footer | Footer area (counter + messages) |
.autopictura-custom-text-counter | Character counter |
.autopictura-custom-text-error | Error message |
.autopictura-custom-text-warning | Warning message (special chars) |
.autopictura-required | Required badge |
.autopictura-optional | Optional badge |
Testing Custom Text
When editing a style in the Autopictura admin, you can test the prompt with custom text:
- Enable custom text and write your prompt template with
{{CUSTOM_TEXT}}. - Scroll down to the test section.
- Enter sample text in the Test custom text field.
- Click Test Prompt — the preview will show the final prompt with your test text substituted in.
Tips
- Keep the
{{CUSTOM_TEXT}}placeholder inside quotes in the prompt (e.g.,"{{CUSTOM_TEXT}}") to help the AI treat it as a distinct text element. - Set a reasonable max length — shorter text (20–50 characters) tends to render more cleanly in AI-generated images than long paragraphs.
- Use the required toggle for styles where the design only makes sense with personalized text (e.g., a name-on-mug product).
- Test with different text lengths and special characters to make sure your prompt produces good results.