Magento2: Empty image alt-text & missing alt attribute on product detail page

Created on 13 Jun 2017  路  9Comments  路  Source: magento/magento2

Preconditions

  1. PHP 7
  2. M2.1.6

Steps to reproduce

  1. Import product images and image labels via csv.

Expected result

  1. Backend: Image "alt-text" field is being filled by the imported image label
  2. Frontend: Product Detail Page Images have alt attribute

Actual result

  1. Backend alt text field is empty, even though label was imported and can be seen on product list page as alt attribute
  2. Frontend: Product Detail Page is missing alt attribute on image fields

This may sound like a "no big deal" but my boss came up this morning with "All our images are removed from google image search"

Fixed in 2.2.x Clear Description Confirmed Format is valid Ready for Work Reproduced on 2.1.x Reproduced on 2.2.x Reproduced on 2.3.x

Most helpful comment

I see that this issue is closed and is clearly an existing bug. I see that this is acknowledged as an issue in 2.3.x. Will it be addressed soon? Is there a workaround for getting alt text imported / exported properly?

Here is the solution that was provided to me by unirgy support:

That feature is available in magento core import/export.
Rapidflow works differently.
You need to run Rapidflow Pro Products Extra profile with CPI rows
https://unirgy.com/wiki/urapidflow/fixed_row_format#cpicatalog_product_image
Basic rapidflow does not cover import of additional images and their labels.

All 9 comments

in category listing M2 use the name from the product for the alt tag. in product detail view, when you dont set the alt text is the alt tag missing. in M1 was the default alt text the product name.

Furthermore it seems the alt-text is saved in "additional_image_label" instead of base_image_label for example

@johnny-longneck, thank you for your report.
We've created internal ticket(s) MAGETWO-80444 to track progress on the issue.

I'm working on it #SQUASHTOBERFEST

PHP: PHP 7.0.15-1+deb.sury.org~xenial+1 (cli) (built: Jan 20 2017 08:53:13) ( NTS )
Magento: 2.2.1-dev

When importing the attached CSV, everything is working as expected:

product_import.csv.zip

image

image

Moving on to research the defaulting of product name into alt text if label is missing.

+1 Having this issue as well. Wondering how soon we might see a fix on 2.1 branch.

The issue has been fixed and delivered to 2.2-develop branch. Will be available with upcoming patch release

I see that this issue is closed and is clearly an existing bug. I see that this is acknowledged as an issue in 2.3.x. Will it be addressed soon? Is there a workaround for getting alt text imported / exported properly?

Here is the solution that was provided to me by unirgy support:

That feature is available in magento core import/export.
Rapidflow works differently.
You need to run Rapidflow Pro Products Extra profile with CPI rows
https://unirgy.com/wiki/urapidflow/fixed_row_format#cpicatalog_product_image
Basic rapidflow does not cover import of additional images and their labels.

In CE 2.3.

  1. If in single store mode. Alt-Tags are not showing when added via php api.
    In multi store mode, Alt-Tags show if in "Default" view but not in "All Store Views".
  2. As well, any image label that is not just [space] or alphanumeric will not let me save the product. (such as a label containing a period)
    https://community.magento.com/t5/Magento-2-x-Programming/php-api-product-image-name-product-image-label-accepted-encoding/td-p/119871
Was this page helpful?
0 / 5 - 0 ratings