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

Insert image using url for cover #10853

Open
Wolf-DieterFiege opened this issue Oct 21, 2018 · 7 comments · May be fixed by #41908
Open

Insert image using url for cover #10853

Wolf-DieterFiege opened this issue Oct 21, 2018 · 7 comments · May be fixed by #41908
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Feature] Blocks Overall functionality of blocks [Type] Enhancement A suggestion for improvement.

Comments

@Wolf-DieterFiege
Copy link

Currently it isn't possible to insert images via url for cover
It would be nice to have this feature.

Please see screenshot attached.
screenshot-image-via-url-for-cover

@Soean Soean added [Type] Enhancement A suggestion for improvement. [Feature] Blocks Overall functionality of blocks labels Oct 21, 2018
@Soean Soean assigned Soean and unassigned Soean Oct 21, 2018
@Soean
Copy link
Member

Soean commented Oct 21, 2018

We have to set backgroundType in the state to video or image. How do we detect the media type from the url?

@Soean
Copy link
Member

Soean commented Oct 22, 2018

Same issue in Media & Text block

@talldan
Copy link
Contributor

talldan commented Jul 31, 2020

It might be feasible to check the content type of the URL using fetch:

const response = await fetch( mediaURL );
const isImage = response.get( 'Content-Type' ).startsWith( 'image' );

but I haven't checked if there are any edge cases around doing this.

@bph
Copy link
Contributor

bph commented Jul 31, 2020

Seems earlier attempts to add this were abandoned. Thanks for surfacing this again.

@skorasaurus skorasaurus added the [Block] Cover Affects the Cover Block - used to display content laid over a background image label Nov 28, 2020
@joemaller
Copy link
Contributor

joemaller commented Feb 28, 2022

Any progress on this?

Pointers to the discussion about removing this? Seems confusing that Media insertion is missing features in otherwise normal contexts

@joemaller
Copy link
Contributor

Workaround?

  1. Insert Image Block, hot-link to external url
  2. Transform hot-linked Image Block to Cover Block

That appears to work perfectly well, except the media url used by the Cover Block can not be edited, only removed or replaced from the Media Library.

@akasunil
Copy link
Member

Created PR 41908. Request for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Feature] Blocks Overall functionality of blocks [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants