gatsby-source-strapi icon indicating copy to clipboard operation
gatsby-source-strapi copied to clipboard

Image Processing in HTML code

Open AliceRossa opened this issue 1 year ago • 1 comments

I'm trying to use the "CKEditor 5 for Strapi" plugin but I can't seem to use Gatsby's image processing for images in HTML code.

{
  "data": {
    "strapiHomepage": {
      "content": {
        "data": {
          "content": "<h1>Homepage</h1><p><img src=\"/uploads/image1.jpg\" alt=\"image1.jpg\"> <src=\"/uploads/image2.jpg\" alt=\"image2.jpg\"></p><p>Welcome on my homepage</p>"
        }
      }
    }
  }
}

I tried to add the code below in gatsby-config.js but without success.

singularName: `homepage`,
queryParams: {
  content: {
    data: {
      populate: {
        content: "*",
      },
    },
  }
}

The only solution found is to add Strapi's api url as a prefix to the images' url, but this is not the solution sought. Is there a particular configuration for processing images from HTML code? Thanks

AliceRossa avatar Sep 23 '22 15:09 AliceRossa

I was wondering the same thing. Can anyone shine some light on this?

cuca-marko avatar Oct 05 '22 21:10 cuca-marko