zce / velite

Turns Markdown / MDX, YAML, JSON, or others into app's data layer with Zod schema.
http://velite.js.org
MIT License
476 stars 23 forks source link

The requested resource isn't a valid image #36

Closed trevorpfiz closed 7 months ago

trevorpfiz commented 8 months ago

⨯ The requested resource isn't a valid image for /static/journey-b48700.png received text/html; charset=utf-8

I believe this may also be happening in the style guide post and the contact page in the Next.js example?

image

Can see how I am adding it to my repo here

zce commented 8 months ago

Can you provide a complete replication steps?

The repo you provide contains too many environment dependencies. I can't replicate this issue.

trevorpfiz commented 8 months ago

Can you provide a complete replication steps?

The repo you provide contains too many environment dependencies. I can't replicate this issue.

sorry about that. isn't the issue present in the Next.js example? I am not seeing the cover image in the Style Guide post or Contact page in the StackBlitz.

zce commented 8 months ago

This is just because the built-in image optimization in Next.js has unknown issues in the StackBlitz.

  1. run it locally
  2. turn off image optimization in StackBlitz.

    /** @type {import('next').NextConfig} */
    module.exports = {
     images: {
       unoptimized: true, // only for stackblitz
     },
     // othor next config here...
     webpack: (config) => {
       config.plugins.push(new VeliteWebpackPlugin());
       return config;
     },
    };
    image
zce commented 7 months ago

ping @trevorpfiz

trevorpfiz commented 7 months ago

ping @trevorpfiz

sorry! have been away from the project. when I come back around to creating a blog with Velite I will open a new issue with a simpler reproduction if I run into problems again. thanks!