italia / designers.italia.it

Designers Italia mette a disposizione la conoscenza e gli strumenti per progettare e realizzare servizi pubblici centrati sulle necessitĂ  delle persone
https://designers.italia.it
BSD 3-Clause "New" or "Revised" License
52 stars 37 forks source link

Images inserted in react-markdown fields are currently not processed as Gatsby Images #1005

Open Fupete opened 11 months ago

Fupete commented 11 months ago

Does a discussion already exist on the topic you are interested in, or on a similar topic?

What

We need to process "inline" images entered directly as ![title](imageUrl) in the react-markdown text fields as "native" Gatsby images.

We need to implement a solution like this (plugin): https://www.gatsbyjs.com/docs/how-to/images-and-media/working-with-images-in-markdown/#inline-images-with-gatsby-remark-images

Why

The use of 'inline' markdown images in the react-markdown 'text' fields could simplify the YAML editing process in long pages as the design system ones.

An argument against this solution: the data structure will be a bit more cluttered, we will authorize/have images in text fields. Could this make it even more complicated to attach a CMS next year? Let's think about it 🤔 .

Context

cc @bfabio @zetareticoli

More

No response

Fupete commented 7 months ago

⚠️ The solution proposed in the issue is not straight forward: we use markdown fields inside yaml data files...

Fupete commented 7 months ago

We have to try to implement the remark-images plugin in all the components where we use react-markdown. Let's make a test later this month.