Problem

Make sure schema nuxt-component-preview is both supporting canvas.image slots good, or provide some alternative!

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

fago created an issue. See original summary.

fago’s picture

Images are defined like this:

 title: Image
	type: object
	examples:
	  - src: "https://images.unsplash.com/photo-1484959014842-cd1d967a39cf?ixlib=rb-1.2.1&ixid=Mnw
xMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80"
		alt: "Woman playing the violin"
		width: 1770
		height: 1180
	$ref: "json-schema-definitions://canvas.module/image"
fago’s picture

atm Drupal canvas does not support picking aspect-ratios or image-styles - Related: #3562276: SDC: support selection of image styles or aspect ratio

However, selecting images is supported via the noted json-schema-type.

We need to extend nuxt-component-preview to allow adding this metadata easily, together with a suiting example.

Then later on, we can look into focal-point support by passing-through the focal-point, so the frontend can apply it, and/or providing a desired aspect-ratio, minimum and/or minimum dimensions in the image metadata.

fago’s picture

Status: Active » Needs review
fago’s picture

That works, but fails with canvas due to errors during url-rewriting. we need to add this as well.

fago’s picture

Status: Needs review » Fixed

tested successfully :-) use nuxt-component-preview beta3 or later to use it! See README for usage details.

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.

Status: Fixed » Closed (fixed)

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