In magento how to create an attribute to upload an image product page admin

In magento how to create an attribute to upload an image product page admin

October 1, 2026 · Illustrated author avatarBy Stefan Bogdanescu
In magento how to create an attribute to upload an image product page admin

Adding an Image Upload Attribute to Your Magento Product Page

In this guide, we’ll walk you through the process of creating a new attribute for uploading an image on your Magento product page admin. We’ll also show you how to make this image display correctly in the frontend.

Step 1: Create the New Attribute

First, log into your Magento admin panel and navigate to Catalog > Attributes > Product. Click on the “Add New Attribute” button.

  • In the ‘Attribute Code’ field, enter logo_image. This will be used for the attribute’s technical identifier.
  • Set the ‘Frontend Label’ as “Logo Image”.
  • Choose ‘Image’ from the ‘Data Configuration’ dropdown.
  • Tick the box for ‘Visible on Product View Page on Frontend’.
  • Click “Save Attribute”.

Step 2: Add the New Field to the Form

Next, we need to add this new field to your product form.

  1. In the admin panel, go to Catalog > Attributes > Product.
  2. Find and click on the attribute you just created (Logo Image).
  3. Under ‘Manage Label/Options’, click on “Create Attribute Set”.
  4. For the ‘Attribute Set Name’, enter a name like “Default”.
  5. Choose your default store view.
  6. Click “Save”.

Step 3: Update Your Product Form

Now, we need to add this new field to our product form.

  1. In the admin panel, go to System > Configuration > Catalog.
  2. Under ‘Catalog’, click on “Product Attributes”.
  3. Find your attribute (Logo Image) in the list.
  4. Set it as ‘Visible’ for the appropriate store views.
  5. Click “Save Config”.

Step 4: Displaying the Logo Image in the Frontend

To display this logo image in the frontend, you’ll need to update your product template.

Open your theme’s catalog_product_view.xml file (usually located at [Magento Root]/app/design/[Vendor Name]/[Theme Name]/layout). Add or update the following XML:

<block type="core/text_list" name="product.info.additional" as="additional" translate="label">
  <label>Product Additional Info</label>
  <block type="catalog/product_view_attributes" name="product.attributes" as="attributes" template="catalog/product/view/attribute.phtml"/>
  <action method="setTemplate">
    <template>catalog/product/view/logo_image.phtml</template>
  </action>
</block>

Next, create a new file named logo_image.phtml under [Magento Root]/app/design/[Vendor Name]/[Theme Name]/template/catalog/product/view. Add the following code:

<?php if($_product->getData('logo_image')): ?>
    <div class="product-logo">
        <img src="<?php echo $this->helper('catalog/image')->init($_product, 'logo_image')->resize(100); ?>" alt="Logo" />
    </div>
<?php endif; ?>

This code will display the logo image of 100px width if it has been set in the admin panel.

Conclusion

By following these steps, you should now have an attribute for uploading a logo image on your Magento product page admin. This image should also be displaying correctly in the frontend view.

Remember to clear your cache after making these changes: System > Cache Management > Flush Magento Cache.

For more advanced customizations and themes, feel free to explore our services at Laravel Company.

Catalog Admin Configuration CLI

Our network