Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Next/image with imgix loader #67

Closed
ludwighogstrom opened this issue Apr 6, 2022 · 9 comments
Closed

Next/image with imgix loader #67

ludwighogstrom opened this issue Apr 6, 2022 · 9 comments
Labels

Comments

@ludwighogstrom
Copy link

ludwighogstrom commented Apr 6, 2022

Describe the bug

Does not add absolute path to the imgix server for the img src.

Your minimal, reproducible example

Sorry no repo...

Steps to reproduce

Use next/image component in a story with the following configuration:

next.config

  images: {
    loader: "imgix",
    path: "https://my-account.imgix.net",
  },

Component with next/image

<Image src={"7f552320-6810-5a2d-8a47-521b22068ae5"} alt={"Alt"} width={42} height={42} />

Expected behavior

When running Next (yarn dev) the img src will automatically be set to https://my-account.imgix.net/7f552320-6810-5a2d-8a47-521b22068ae5.

When running Storybook the img src will only be 7f552320-6810-5a2d-8a47-521b22068ae5 right now. This results in a load to localhost and a 404 response.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

macOS

storybook-addon-next version

v1.6.2

Additional context

No response

@RyanClementsHax
Copy link
Owner

Thanks for reporting the issue! This is actually a bug. I'm consistently humbled by how well users can find blind spots in my code lol.

The issue is that I don't load the image config like nextjs does. Right now I ignore it. I'll get to work on this soon.

@RyanClementsHax RyanClementsHax added the bug Something isn't working label Apr 9, 2022
@ludwighogstrom
Copy link
Author

Thanks for fast response! Also want to take the opportunity to say thank you for running this package. Just started to use it but really saves a lot of the hassle to make Next work with Storybook.

@RyanClementsHax
Copy link
Owner

Thanks a bunch! That means a lot :) I'm glad it's working out for you.

@RyanClementsHax
Copy link
Owner

This seems to be solved also by solving #70. So check there for updates for now.

@github-actions
Copy link

This issue has been automatically marked stale because it it received no activity for 60 days. If you wish to keep this open, please leave a comment. Thanks.

@github-actions github-actions bot added the Stale label Jun 21, 2022
@RyanClementsHax
Copy link
Owner

Go away

@github-actions
Copy link

This issue has been automatically marked stale because it it received no activity for 60 days. If you wish to keep this open, please leave a comment. Thanks.

@github-actions github-actions bot added the Stale label Aug 21, 2022
@github-actions
Copy link

This issue has been automatically closed because it received no activity for 60 days. If you think this was closed by accident, please leave a comment. Thanks.

@RyanClementsHax
Copy link
Owner

I have created this discussion to centralize supporting these nextjs props #119

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants