-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
Images aren't being loaded using "data-srcset", unable to define data-srcset on <source> #316
Comments
You should use options to enable this (https://github.com/webpack-contrib/html-loader#object), |
Are you referring that I need to use a filter instead of just another option? I've tried this with no luck:
|
Should work, anyway I prepare new release #317 and you can use:
|
I've tried this exactly but it did not work, instead I did this:
Which worked, but then
Error is: Thanks |
You need to use urlFilter and filter non standard urls |
I've tried that as well as I still get the same error. My code below:
Currently it doesn't hit the console.log on any URLS with non-standard urls. It immediately errors on any non-standard URLS before the urlFilter function gets to run it seems. Is this related to file-loader instead? |
Expected Behavior
Images using data-srcset on
Actual Behavior
Images aren't being loaded. Compilation happens but when the image is fetched by srcset it can't find it in the assets folder.
Also unable to define it like so, as it returns invalid, saying that data-srcset is not a valid tag on "source":
Code
How Do We Reproduce?
Install htm-loader and file-loader with webpack. Create a picture tag inside an html file with img and source inside of it. Use data-srcset in the source tag for lazysizes to work.
The text was updated successfully, but these errors were encountered: