Skip to content
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

Support for external images #4311

Closed
WPprodigy opened this issue Jan 5, 2018 · 2 comments
Closed

Support for external images #4311

WPprodigy opened this issue Jan 5, 2018 · 2 comments
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Feature] Media Anything that impacts the experience of managing media [Feature] Paste
Milestone

Comments

@WPprodigy
Copy link
Contributor

Issue Overview

To come across this issue, I copy/pasted a blog article from my live site onto a local testing site. The result of this is some console errors for each image I had originally embedded on the live site:

This is happening because the image blocks store an ID like this <!-- wp:image {"id":909} -->, and said image doesn't actually exist on my local site. So this REST API call fails essentially:

image: `/wp/v2/media/${ id }`,

The block settings adjust correctly and don't display the option to change the image's size, but instead of correcting this error for future page-loads, Gutenberg just leaves it as-is and continues to make api requests that fail.

I'm not really sure what the best solution here is, but I'm thinking that support for linking to external images would be the cleanest path. And when an image ID is found to not exist, it could strip away the ID property in the comment object.

@mtias mtias added the [Feature] Media Anything that impacts the experience of managing media label Jan 5, 2018
@mtias
Copy link
Member

mtias commented Mar 7, 2018

Related #1536

@danielbachhuber danielbachhuber added this to the Merge Proposal: Media milestone Jun 4, 2018
@danielbachhuber danielbachhuber added the Backwards Compatibility Issues or PRs that impact backwards compatability label Jun 15, 2018
@mtias
Copy link
Member

mtias commented Oct 3, 2018

Closing in favor of #1536, #9264, and #9301.

@mtias mtias closed this as completed Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Feature] Media Anything that impacts the experience of managing media [Feature] Paste
Projects
None yet
Development

No branches or pull requests

3 participants