Hello! Looks like the image_src tag is getting output as a meta tag in 8.1.x, instead of a link tag as it did in D7.

Entering https://www.drupal.org/files/drupal_logo-blue.png in the "image" config field on admin/config/search/metatag/global results in a meta tag getting output:

<meta name="image_src" content="https://www.drupal.org/files/drupal_logo-blue.png">



Looking around the web, and in the d7 version, I'd expect to see a link tag instead.

<link rel="image_src" href="https://www.drupal.org/files/drupal_logo-blue.png">

All that needs to change to make this happen is the ImageSrc class should extend LinkRelBase instead of MetaNameBase, and a couple tests need updates.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jiff created an issue. See original summary.

jlandfried’s picture

Status: Active » Needs review
FileSize
1.71 KB

patch attached

jlandfried’s picture

Status: Needs review » Needs work

Actually, started running into some issues while looking into https://www.drupal.org/node/2628472. We lose all of the image src extraction functionality that's currently contained in MetaNameBase when we switch to LinkRelBase, so this isn't ready yet.

jlandfried’s picture

Status: Needs work » Needs review
FileSize
1.88 KB

Looks like ImageSrc is the only tag that is of type image that should extend LinkRelBase, so I think this can be handled as a special case. Happy to be corrected if that's not the case, or this isn't the best way to handle this though.

DamienMcKenna’s picture

Status: Needs review » Needs work

I think a better approach would be to run parent::output() in LinkRelBase and then adjust the array accordingly.

jlandfried’s picture

Status: Needs work » Needs review
FileSize
2.59 KB

Something more like this?

DamienMcKenna’s picture

Yes, awesome :) I'll review it in the morning.

rbayliss’s picture

Makes sense... I won't RTBC it since Damien's already on it, but it looks good to me!

DamienMcKenna’s picture

DamienMcKenna’s picture

Status: Needs review » Fixed

Committed. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.