Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic ESM import? #166

Open
gorbak25 opened this issue May 15, 2023 · 0 comments
Open

Dynamic ESM import? #166

gorbak25 opened this issue May 15, 2023 · 0 comments

Comments

@gorbak25
Copy link

In my frontmatter for my upcoming blog i want to have the ability to a specify a path to an image which will be optimized and end up in the Open Graph attributes for the given page. To do so I need the ability to dynamically get an url for the optimized asset. When doing await import(props.ogImage) it works fine in the dev server but the import fails when building the page. renderImg works but returns HTML for an img tag, I only need to obtain the path to the optimized image. importRemoteImage also doesn't work for my local assets.

Is there a good way to do what i want using this project besides parsing the resulting html?

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

No branches or pull requests

1 participant