Skip to content

Commit

Permalink
Merge pull request #314 from Oksydan/product-images-alt-fix
Browse files Browse the repository at this point in the history
Product images - display proper alt for image
  • Loading branch information
Oksydan authored Nov 3, 2023
2 parents 048d836 + d8e686b commit 5ad3fe2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 6 additions & 4 deletions templates/catalog/_partials/product-cover-thumbnails.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@
{generateImagesSources image=$image size='large_default' }
width="{$image.bySize.large_default.width}"
height="{$image.bySize.large_default.height}"
{if !empty($product.default_image.legend)}
alt="{$image.legend}" title="{$image.legend}"
{if !empty($image.legend)}
alt="{$image.legend}"
title="{$image.legend}"
{else}
alt="{$product.name}"
{/if}
Expand Down Expand Up @@ -167,8 +168,9 @@
{generateImagesSources image=$image size='home_default'}
width="{$image.bySize.home_default.width}"
height="{$image.bySize.home_default.height}"
{if !empty($product.default_image.legend)}
alt="{$image.legend}" title="{$image.legend}"
{if !empty($image.legend)}
alt="{$image.legend}"
title="{$image.legend}"
{else}
alt="{$product.name}"
{/if}
Expand Down
5 changes: 3 additions & 2 deletions templates/catalog/_partials/product-images-modal.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@
width="{$image.bySize.large_default.width}"
height="{$image.bySize.large_default.height}"
loading="lazy"
{if !empty($product.default_image.legend)}
alt="{$image.legend}" title="{$image.legend}"
{if !empty($image.legend)}
alt="{$image.legend}"
title="{$image.legend}"
{else}
alt="{$product.name}"
{/if}
Expand Down

0 comments on commit 5ad3fe2

Please sign in to comment.