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.

Parcel image data url test

See original GitHub issue

The data URL test is possible using the built-in data-url: named pipeline.

import imagePath from 'data-url:./image.png';

That uses @parcel/transformer-inline-string and @parcel/optimizer-data-url under the hood.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
devongovettcommented, Mar 24, 2020

Haha well, we don’t really have any docs at all yet, as you’ve probably discovered. It’s one of the next things we’ll be working on as we prepare for a stable Parcel 2 release.

0reactions
surmacommented, Apr 21, 2020

Fixed this in bf021c2442009010de2cdc42e2a29cff2180f2d4

Read more comments on GitHub >

github_iconTop Results From Across the Web

Image - Parcel
Parcel has built in support for resizing, converting, and optimizing images. Images can be referenced from HTML, CSS, JavaScript, or any other file...
Read more >
Can't get the @parcel/optimizer-data-url to convert the images ...
Can't get the @parcel/optimizer-data-url to convert the images in url for backgrounds into inline base64.
Read more >
URL Parameters – Parcel Documentation
URL Parameters. Show image descriptions. This transformer automatically adds URL parameters to links. For example, with it, you can automatically ...
Read more >
Cross-Browser data URI encoding test - CodePen
Various methods of encoding SVG in data: URIs, for testing across browsers.... ... <img src="data:image/svg+xml;base64 ...
Read more >
placeholder-image-data-url - npm package - Snyk
Generate Data URL of placeholder images for given width and height For more information about how to use this package see README ·...
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