Problem/Motivation
A common scenario with SEO output is to have a media field on a node and want to display the URL of the image in the meta data. It's unclear how to do this with Schemaorg Blueprints.
Proposed resolution
Work out the minimum requirements to output the URL of an image from a media item that's added on a field on a content type as a data item.
Add the steps to the documentation as a HOWTO item.
Remaining tasks
Work out the minimum requirements to output the URL of an image from a media item that's added on a field on a content type as a data item.
Add the steps to the documentation as a HOWTO item.
User interface changes
n/a
API changes
n/a
Data model changes
n/a
Issue fork schemadotorg-3407113
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
damienmckennaSo I can add these to the JSON-LD output like this:
In this case "field_top_image" is an entity reference field, "image" is the field for the image file on the media object as identified on the Image media type's field specifications, and "hero_image" is the image style that's used to render the image.
So the question is - can this output be easily output by customizing the UI?
Comment #3
jrockowitz commentedWe could add a setting to output certain media types as the URL to the source and not a full https://schema.org/MediaObject
Comment #4
jrockowitz commentedWe could enhance "Schema.org type entity references display" (https://schemadotorg.ddev.site/admin/structure/media/manage/image/fields) token.
media--image: "[media:image:url:absolute]",Generally, I think people will decide to include the image's ImageObject or the image's URI sitewide.
Comment #5
jrockowitz commentedWe might be able to adjust to 'schema_type_entity_references_display' to 'media--image' to be the image's url.
Comment #6
jrockowitz commentedI think we could support something like
Comment #7
jrockowitz commentedComment #10
jrockowitz commented