Storybook image urls should work from anywhere

Created on 14 November 2024, 8 days ago

Problem/Motivation

Currently we need to hard code image urls when we have images in storybook. We can make it relative to a project root. e.g. `web` but that still requires starting the image url path back at `themes/contrib/bluecheese/blah`. But we can't rely on that being where bluecheese will live in a given project structure. Morever, we want to be able to render bluecheese components in storybook even if they are being hosted on a different server like github pages for example.

Steps to reproduce

In any of the stories.twig files that's using the 'url' version of the image template, strip back the url to where it would be most relative. Observe that the image will not render.

Proposed resolution

Investigate the patches here https://www.drupal.org/project/storybook/issues/3441430 πŸ’¬ Image not displayed correctly because image path is relative Active
or come up with another strategy.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States spicy.werewolf

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024