Problem/Motivation

Images are the most-used shape and the one with the most existing behaviour to preserve: derivatives by image style, alt and title, dimensions, and the default image case. There are two paths to the same output — a plain image field and an entity reference to an image media entity — and both appear across the sites.

Proposed resolution

  • Port the existing image structure into an image shape, taking the style from the property settings.
  • A media_image shape that resolves the media entity, finds its source field and delegates to the same builder, so the output is identical whichever way the site stores images.
  • Validate the style name before a derivative is built, and keep the fix for the default image that used to return an empty alt and image_id: 0.
  • Cache metadata from the file and the media entity, not just from the host entity.

Remaining tasks

Everything.

Issue fork myrest-3620123

Command icon 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

sergeydruua created an issue. See original summary.

sergeydruua’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

sergeydruua’s picture

Status: Fixed » Closed (fixed)