Questions tagged [urlloader]

223 questions
82
votes
7 answers

Dynamically Add Images React Webpack

I've been trying to figure out how to dynamically add images via React and Webpack. I have an image folder under src/images and a component under src/components/index. I'm using url-loader with the following config for webpack { test:…
pandorz
  • 823
  • 1
  • 6
  • 4
61
votes
3 answers

Url-loader vs File-loader Webpack

I'm trying to figure out the difference between url-loader vs file-loader. What does DataURl mean? The url-loader works like the file-loader, but can return a DataURL if the file is smaller than a byte limit.
stackjlei
  • 9,485
  • 18
  • 65
  • 113
22
votes
7 answers

webpack not able to import images( using express and angular2 in typescript)

I am not able to import images in my headercomponent.ts. I suspect it is because of something i am doing wrong while compiling ts(using webpack ts loader) because same thing works with react( where the components are written in es6) The error…
Sahil Sharma
  • 1,493
  • 2
  • 10
  • 22
20
votes
1 answer

webpack require relative image

I have two files: ./img/mypic.png ./js/help/targets/target.js In target.js: With webpack.config.js: 14 module: { 15 loaders: [ 16 { test: /\.js$/, loader: 'jsx-loader?harmony' }, 17…
Henrik
  • 9,714
  • 5
  • 53
  • 87
18
votes
4 answers

Webpack url-loader set destination path

I'm using webpack's url-loader plugin and have it configured as: { test: /\.(ttf|eot|woff|woff2|svg)$/, loader: "url-loader?limit=50000" } It output files > 50k to the file system, but I can't find how to set a destination path. In this…
user3900456
  • 2,003
  • 3
  • 25
  • 33
17
votes
1 answer

Access HTTP response headers in for flash.net.URLLoader object?

Is there a way to access the response headers from an HTTP result when using Flash/Flex's URLLoader? Setting the request headers is possible, as is accessing the response code, but getting a hold of the actual response headers seems to be…
aaaidan
  • 7,093
  • 8
  • 66
  • 102
12
votes
3 answers

Webpack [url/file-loader] is not resolving the Relative Path of URL

I am facing a problem in Webpack regarding Relative Path. Let me try to explain the scenario : I have 2 separate project in Workspace directory : Project-A [Bundling using Gulp] : Stable & Working Project-B [Bundling using Webpack] : New…
Ravi Roshan
  • 1,177
  • 2
  • 11
  • 28
9
votes
0 answers

React + SSR + webpack + node, unexpected token �PNG

I'm having webapp in react with server side rendering feature running on node server. I'm using local images from assets directory (as shown below: which is running fine on the…
8
votes
1 answer

Webpack inline font with url-loader

I’m trying to inline some fonts as base64-encoded Data URI’s but am having no luck with Webpack’s url-loader. Which is weird because the url-loader seems to be doing just that for my image and svg files. My setup is below: directory…
Tyler Reitz
  • 103
  • 2
  • 9
8
votes
2 answers

Image Upload progress using URLLoader AS3

I am developing image uploader in Flash. I use FileReference.browse to browse image then resize this image to 1000 x 1000 px, if the image is very big and then upload to server. I want to show progressbar for the image upload progress. I am usinng…
Neeraj Khanna
7
votes
3 answers

Why is my URLLoader not dispatching when it completes?

I'm using a URLLoader to send a few key/value pairs to a php script, which then turns them into an e-mail, sends it (or not), and then echoes a string with a response. At first it works fine. The URLLoader posts, and I get my e-mail a minute later,…
Matt Chase
  • 111
  • 1
  • 7
7
votes
4 answers

url-loader / file-loader breaking relative paths in css output using webpack

I am using webpack with some plugins and loaders to take my src/ folder and build a dist/ folder. url-loader (which falls back to file-loader when images are larger than a specific limit) is outputting images it finds in my html and scss files to…
Jordan Walker
  • 550
  • 1
  • 5
  • 17
7
votes
2 answers

Unable to resolve absolute url() paths for background images in CSS with Webpack

I have the following Webpack config (roughly, it has been simplified for this post): const rootPublic = path.resolve('./public'); const LOCAL_IDENT_NAME = 'localIdentName=[name]_[local]_[hash:base64:5]'; const CSS_LOADER =…
Muers
  • 3,190
  • 3
  • 26
  • 32
6
votes
1 answer

Flex Multipart Upload Progress

I am uploading a file to a server using a multipart URLLoader. I am able to upload the file fine. I have tried to listen to the progress event on the URLLoader but it only fires at the very end of the upload. How do I get the progress event more…
asawilliams
  • 2,908
  • 2
  • 30
  • 54
6
votes
1 answer

How do I fix this cross-domain ActionScript 3 error?

I'm going to be as specific and verbose as possible and include some of the code I'm using. I already did a search and found this question, which seems similar; however the author there was using ActionScript 2 instead of 3, and I couldn't seem to…
soapergem
  • 9,263
  • 18
  • 96
  • 152
1
2 3
14 15