#Is it possible to use images from a CMS in conjunction with the assets pipeline ?

2 messages · Page 1 of 1 (latest)

cursive frost
#

I would like to make a component that takes an image src and uses the getImage function or <Image /> component to display it.
The key thing is I can't import the asset because the path is going to be provided by the client via a CMS (Sanity in my case).
I would like to use advanced features of the asset pipeline though, such as the ability to convert to AVIF on the fly.

My question might show I don't really comprehend at what time the asset pipeline is doing its job. Is it during the built step (e.g. when I run pnpm run dev) ? In that case what I might not be able to feed an URL determined at execution time to the Asset pipeline right ? If so what are the alternatives ?

frail havenBOT
#
Quiet in here?

It looks like no-one has responded to your question yet. People might not be available right now or don’t know how to answer your question. Want an answer while you wait? Try asking our experimental bot in #1095492539085230272.