Questions tagged [data-url]

Data URL is a misspelling of Data URI - a URI which represents the resource itself, rather than the location of the resource.

Data URL is a misspelling of Data URI - a URI which represents the resource itself, rather than the location of the resource.

Please use the tag for questions about Data URIs.

137 questions
40
votes
6 answers

Is it possible to use data URIs in video and audio tags?

Assuming the following: The browser in question doesn't limit the size of data URIs. There is actually a purpose to doing this (so please refrain from asking "what's the point?" and "you do realize base64 encoding will expand your file by 33%,…
user123003
28
votes
2 answers

Loading image src using a variable containing base64 data in AngularJS

Loading image using variable containing base64 data in AngularJS I am trying to find the right way to load a image source from a variable containing base64 encoded image data (for example pulled from a canvas using toDataURL(); ). At first I just…
Wilt
  • 41,477
  • 12
  • 152
  • 203
22
votes
3 answers

Canvas toDataUrl increases file size of image

When using toDataUrl() to set the source of an image tag I am finding that the image when saved is a great deal larger than the original image. In the example below I am not specifying a second param for the toDataUrl function so the default…
Lishamatish
  • 551
  • 2
  • 4
  • 18
22
votes
6 answers

Data URI scheme and Internet Explorer 9 Errors

I'm having a problem using the RFC 2397 data url scheme with IE versions 6-9. My sample code below works without problem when using current versions of Safari, FF, Opera and…
DaveCS
  • 950
  • 1
  • 10
  • 16
18
votes
3 answers

Convert Data-URL to BufferedImage

I have a Data-URL from an image file and have to pass it through to another function. Along this path from Data-URL to the BufferedImage it needs to be a byteArray. my approach was the following: String dataUrl; byte[] imageData =…
Daniel
  • 293
  • 1
  • 6
  • 15
16
votes
5 answers

Force download of 'data:text/plain' URL

I was wondering whether it is possible to force a browser (at least Chrome) to download a data:text/plain URL. Chrome does download binary URLs (e.g. data:application/zip;base64,...), but it does not download files that can be viewed inside the…
pimvdb
  • 151,816
  • 78
  • 307
  • 352
15
votes
1 answer

Base64 PDF in new tab shows Blank Page before Refresh

The title says it all really... I have a base64 pdf string which I append to: data:application/pdf;base64, The pdf is brought into a new tab using a link in my webpage. A blank page will initially show up, but then I refresh the page and it displays…
Michael Adair
  • 301
  • 3
  • 10
13
votes
4 answers

multiple instances same data url image

How do you re-instantiate an already declared base64 data url image without having to re-insert the base64 code on the same page?(preferably with css) I tried: