aws-amplify / aws-amplify/amplify-hosting

AWS amplify not rendering image using the dynamic online url while local build render image correctly

Open
#3,308 2 comments 0 reactions 0 assignees View on GitHub
hosting question
Dominant language
Dockerfile
Stars
481
Forks
123
PR merge metrics
No merged PRs in 30d

Description

### Before opening, please confirm:

- [x] I have checked to see if my question is addressed in the [FAQ](https://github.com/aws-amplify/amplify-hosting/blob/master/FAQ.md).
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-hosting/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting questions](https://github.com/aws-amplify/amplify-hosting/blob/master/CONTRIBUTING.md).
- [X] I have removed any sensitive information from my code snippets and submission.

### App Id

d189enz34xyk65

### AWS Region

us-east-1

### Amplify Hosting feature

Web previews

### Question

Locally I got:
![image](https://user-images.githubusercontent.com/60851473/218915552-f5a7f7e4-cd7b-41b3-a82a-c0a849043834.png)
The deployed version I got:
![image](https://user-images.githubusercontent.com/60851473/218915608-6f3ba0b8-fa3b-4899-a11a-dbbb5e191d70.png)

I'm not sure why the service URL is added before the image URL. And the wired thing is the dynamic url path does not load correctly while the static path works well.
![image](https://user-images.githubusercontent.com/60851473/218918080-81e38e01-fc72-46d2-a930-5dbc707f125a.png)

I guess it might have to do with the path redirection so below is my setting:
![image](https://user-images.githubusercontent.com/60851473/218918114-d30a0ba5-d66f-4a34-b623-3568dfc010dd.png)

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the linked FAQ and contributing guide, then inspect the Web previews configuration and the shown path-redirection settings. Compare the local and deployed image URLs, focusing on why the dynamic path differs from the static path. Done means identifying the cause and documenting or resolving the deployed image-loading behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.