If your images are part of your project and are deployed alongside your web app, you should use relative paths instead of absolute paths. This ensures the images can be accessed regardless of the deployment environment.
For a more scalable solution, you can store your images in Azure Blob Storage and update your code to reference these images.
Steps to Use Azure Blob Storage:
- Create a Blob Storage Account:
- Navigate to the Azure Portal.
- Create a new Storage Account or use an existing one.
- In the Storage Account, create a Blob container and upload your images.
- Update Your Code:
- Modify your image URLs in the web app to point to the Blob Storage URLs.
- Example URL:
https://<storage-account-name>.blob.core.windows.net/<container-name>/<image-name>
- Access Control:
- Ensure the Blob container has the appropriate access level (public access if the images should be publicly accessible).