nuxt-modules / og-image

Generate OG Images with Vue templates in Nuxt.
https://nuxtseo.com/og-image
361 stars 23 forks source link

predefined images do not work #145

Closed jpengelbrecht closed 5 months ago

jpengelbrecht commented 5 months ago

Using the url of predefined images doesnt work.
for example

image

from the docs i use this example

image

the above code will result in no OG image being generated.

if i use this example to render the template using an image inside a normal template

image

i get the following error.

image

also as a final note, i also noted that this og image rendered doesn't like webp usage and breaks whenever i try use it.

here is a test repo https://github.com/jpengelbrecht/nuxt-seo-route-rules-issue/blob/main/app.vue

harlan-zw commented 5 months ago

the above code will result in no OG image being generated.

it shouldn't generate an OG Image, it should just add the meta tags pointing to this file? It just acts as a shorthand for avoiding to manually define all of the tags

if i use this example to render the template using an image inside a normal template

this is likely because the image can't be accessed

jpengelbrecht commented 5 months ago

@harlan-zw so the odd thing is.

image

works on playground so don't think the image is the problem

image

however it doesn't work on generate. it gives this error

image

then using this way

image

shows this in the generator

image
harlan-zw commented 5 months ago

Can you share a reproduction so I can see what's going on?

For the second issue, this is a known issue for predefined images, see https://github.com/nuxt-modules/og-image/issues/129. You should use a third-party tool to preview the og image if you want to verify it (Nuxt DevTools also has issues).

jpengelbrecht commented 5 months ago

@harlan-zw here you go https://github.com/jpengelbrecht/nuxt-seo-route-rules-issue/blob/main/app.vue

harlan-zw commented 5 months ago

Thanks, sorry missed it the first time :laughing:

I've pushed up a fix for the prerendering issue in 3.0.0-rc.27

jpengelbrecht commented 5 months ago

no stress dude! you have been fixing these patches like a mad man, really appreciate the effort you put in man