Boost Your Shopify Product Pages: Dynamic Banners & Text Over Images (No More Image Editing!)

Hey fellow store owners! Ever found yourself wishing you could easily slap a "New Arrival" or "Limited Edition" banner right onto your product images without painstakingly editing every single photo? You're not alone! This exact question recently popped up in the Shopify community, sparked by Darren_Hebrard, highlighting a common pain point for many of us.

Darren wanted a toggleable, custom text option for banners, avoiding endless image variations. The community offered fantastic solutions, presenting two main paths: a DIY approach using Shopify's built-in metafields and Liquid code, or leveraging a dedicated app for advanced customization.

The DIY Path: Dynamic Banners with Metafields & Liquid

Highly recommended by community members like oscprofessional, Hardeep, Custom-Cursor, and rshrivastava63, this method is clean and efficient. It lets you manage dynamic text or banners on your product images directly from your Shopify admin, without needing an image editor.

The core idea utilizes metafields – extra data fields attached to your products. This allows you to store specific banner text and even a toggle for each product.

Step-by-Step: Setting Up Custom Product Banners

1. Create Your Product Metafields

You'll create two metafields in your Shopify Admin (Settings > Custom data > Products > Add definition):

  • For Banner Text:
    • Name: Product Banner Text
    • Namespace and key: custom.banner_text (Crucial for code!)
    • Type: Single line text.
    • Ensure Storefronts access is checked.
  • For Show/Hide Toggle (Recommended):
    • Name: Show Product Banner
    • Namespace and key: custom.show_banner
    • Type: True or false.
    • Ensure Storefronts access is checked.

These fields will appear under "Metafields" in your product editor.

2. Add the Liquid Code to Your Theme

This tells your theme to display the banner. Edit your theme code (Online Store > Themes > Actions > Edit code).

  • Open sections/main-product.liquid.
  • Locate your product media/image section (e.g., a div with class product__media or product-media).
  • Insert the following Liquid code. This displays the banner if the toggle is 'true' AND the text field isn't empty:

    {% if product.metafields.custom.show_banner and product.metafields.custom.banner_text != blank %}
      
    {{ product.metafields.custom.banner_text }}
    {% endif %}

    If you only created the text metafield, use this simpler version:

    {% if product.metafields.custom.banner_text != blank %}
    
    {{ product.metafields.custom.banner_text }}
    {% endif %}

    Click Save.

    3. Style Your Banner with CSS

    Make your banner look great and position it correctly. The key is position: absolute; for the banner within a parent container that has position: relative;.

    • In your theme editor, open your main CSS file (e.g., assets/base.css or assets/theme.css).
    • Add these styles, customizable to your brand:

      .product-banner {
        position: absolute;
        top: 20px; /* Adjust vertical position */
        left: 20px; /* Adjust horizontal position */
        background: #ff5a3c; /* Example background color */
        color: #fff; /* Example text color */
        padding: 10px 18px;
        font-size: 16px;
        font-weight: 700;
        text-align: center;
        text-transform: uppercase;
        border-radius: 4px;
        z-index: 10; /* Ensures it's on top */
        display: inline-block; /* Sizes to content */
        border: 2px solid #ff5a3c; /* Optional border */
      }
      /* CRUCIAL: Makes the banner position relative to the image wrapper */
      .product__media, .product-media {
        position: relative;
      }
      

      Click Save. Now, your custom messages will appear over product images!

      The App Path: "Easify Custom Product Options" (Code-Free & Advanced)

      If coding isn't your preference, or you need advanced features like live customer personalization, an app is a powerful alternative. Easify-Jennifer highlighted "Easify Custom Product Options" for this.

      This app enables custom text boxes and visually layers that text onto product images with a live preview. Customers can type a personalized message and see it appear in real-time – fantastic for customizable items!

      Here’s how custom text can be displayed directly on the product image:

      Live preview of custom text on a product image using Easify app

      Easify also offers conditional logic, allowing banners or text fields to appear based on other selections. This simplifies managing complex options or promotions.

      Easify app settings for adding custom text options

      The app manages everything through layers, avoiding multiple product images. You can apply option sets across many products, streamlining campaigns or personalized offers.

      Configuring text layers in Easify Product Personalizer

      Easify app's conditional logic for displaying text layers

      Customer view of live personalized text on a Shopify product image

      Choosing Your Path to Dynamic Product Banners

      Your choice between the DIY metafields approach and an app like Easify depends on your needs. Metafields are cost-effective and offer direct control for simple, internal banners, requiring basic code editing. The community's snippets make it quite manageable.

      For customer-facing personalization, live previews, or code-free management of complex conditional banners, an app provides a streamlined, scalable solution. While it has a subscription, it saves development time and expands customization possibilities.

      Both methods solve the core problem of avoiding endless image editing, a huge time-saver for any busy store owner. Consider your technical comfort, budget, and desired customization level to pick the best solution for your products!

Share:

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools