0

How can I create a dynamic proxy for all the assets uploaded in Contentful in netlify.toml file.

Ex- I want to create proxy like example.com/image/Banner.jpg which should point to Contentful Banner.jpg file,

I want to create proxy redirects dynamically for all asset files so that I do not need to add redirects for each file manually in netlify.toml file

Ankit Kumar
  • 118
  • 12
  • 1
    Hey Ankit, you will have to create a script to handle this. The image URL contains the Asset ID and a Unique ID which are autogenerated for each image. Hence, for each image, these IDs will be unique. You can set up a webhook that would get triggered when a new asset gets uploaded, execute the script, and update the .toml file. – harshil1712 Jan 02 '23 at 14:30

0 Answers0