Skip to content

Commit

Permalink
Defaults empty alt for SEO
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquinrivero committed Oct 28, 2024
1 parent 1bdfd4a commit 6022cee
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libs/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,7 @@ export function decorateSVG(a) {

const src = textUrl.hostname.includes(`.${SLD}.`) ? textUrl.pathname : textUrl;

const img = createTag('img', { loading: 'lazy', src });
if (altText) img.alt = altText;
const img = createTag('img', { loading: 'lazy', src, alt: altText || '' });
const pic = createTag('picture', null, img);

if (textUrl.pathname === hrefUrl.pathname) {
Expand Down

0 comments on commit 6022cee

Please sign in to comment.