-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
data-src doesn't load images from assets folder #2650
Comments
Try to move your images to <img data-src="/images/kitten-large.png" class="lazyload lazy"> The |
@NicoPennec yes this is working from |
Other words, I guess I need to store only small images in |
Also, I have other plugins that use custom attributes to load images - and they working fine with images from |
You can add module.exports = {
build: {
extend(config, { isDev }) {
const vueLoader = config.module.rules.find((rule) => rule.loader === 'vue-loader')
vueLoader.options.transformToRequire['img'] = ['src', 'data-src']
}
}
} |
image set in static nuxt/nuxt#2650
solution here, latest answer by clarkdo commented on 24 Jan nuxt/nuxt#2650
Any feedback on this? |
@shindeefranco |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I am using great https://github.com/aFarkas/lazysizes package
It need such code
But with
data-src
attribute Nuxt doesn't load images.What should I do?
The text was updated successfully, but these errors were encountered: