question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to input image via url

See original GitHub issue

Please is there a way to input a path(URL) to an image on the cropper.

eg:

<image-cropper src="https//picsum.photos/200"></image-cropper>

or

<image-cropper imageUrl="https//picsum.photos/200"></image-cropper>

Because am loading data from a server that returns images as URL.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:18 (5 by maintainers)

github_iconTop GitHub Comments

7reactions
akalinserhatcommented, Apr 26, 2019

Hello there, After a long effort, I managed to upload an image to the ngx-image-crop with the URL.

async setCropperImage (url: string) { const result: any = await fetch (url); const blob = await result.blob (); let reader = new FileReader (); reader.readasdataurl (blob); reader.onload = () => { console.log (reader.result); this.imageBase64 = reader.result; } }

********* HTML SIDE **************

<image-cropper [imageBase64]=“imageBase64” [resizeToWidth]=“0” [aspectRatio]=“16 / 9” [maintainAspectRatio]=“true”></image-cropper>

2reactions
r-sw-eetcommented, Oct 20, 2020

Here’s an example of the cropper working with a base64 input: https://stackblitz.com/edit/image-cropper-base64?file=app%2Fapp.component.ts

Not working anymore. Can you please reupload this example?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make a URL for a picture on your computer - Canto
In order to upload your pictures directly to the website, first navigate to PostImage and click the 'Choose images' button. A popup window...
Read more >
How to Make a Picture Into a Link - HubSpot Blog
Step 1: Select your image. · Step 2: Optimize size and scale. · Step 3: Upload your image and get the URL. ·...
Read more >
What are some ways to add a URL to an image? - Quora
Using a web browser, type Control-O to open a local file. Navigate to the image and double click on it. The URL will...
Read more >
Adding an image from a url - html - Stack Overflow
Based on the URL you've presented in the comments above, my guess is that you're not actually linking to an image, you're liking...
Read more >
4 Ways to Get the URL for Pictures - wikiHow
1. Open the Google Image search page. Go to https://images.google.com/ in your computer's web browser. This will open the Google search page for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found