-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
img with unreachable src blocks all amp html #112
Comments
Hey @NNSTH The parser will not stop after one broken image src. It will just return the original value, but continues with the other tags. Using your provided HTML, I ended up having this result:
There's a problem with accessing the first image (first it gets redirected, then the access is forbidden.). You can clearly see, that the second images (which is a I'm closing this issue, as it's not an issue with amperize. |
Hi @AileenCGN |
Hey @NNSTH I see. Yeah, you are right. A failure in the request should result in a converted |
You can see the fixes I've made to amperize.js in order to fix it the way I thought: {alt/title text} , if it is blank- I just skip it
//skip invalid amp components
and then:
|
@AileenCGN Is that important for Ghost? |
@kirrg001 It shouldn't be bad. I need to check the behaviour if the image is not accessible and therefore can't be shown. In Ghost, we currently strip those tags out and they're just missing. But the expected behaviour should be that we transform the tag, give it default values and and show the |
Why do you fail all amp content if one image has wrong src? please leavi it for config option- what to do with wrong src: throw error, ignore and put it as amp-img and try using alt, etc.
I fail with trying to amperize my html like this:
The text was updated successfully, but these errors were encountered: