Comments (7)
I am using @nuxt-image
and vuetify
in my personal website here is a link to my config file that sets the responsive image breakpoints to be the same as vuetify. If there are any issues or hard to use thing you come across while using @nuxt-image
and vuetify
together I would love to hear your feedback. I would love to make the integration better.
from image.
Is there a way to use vuetify v-img component with this module?
The module injects a utility into Vue context. This utility could be used to resize and optimize images using specific provider. For now it has general functionality and you may need to rewrite most of nuxt-image
login by yourself. But in the near future this utility will be rich enough to support your needs.
Would it be possible to add a slot to the nuxt-image component and use slot props on the v-img?
Could explain why do you require a slot in the image components? I believe you can design your layout without the slot.
from image.
@farnabaz sorry I couldn't see the utility in the documentation. If I can get the optimized src and set from the utility then I wouldn't need the slot. Could you please provide an example of the utility in use or add it to the docs usage page?
I am looking for a simple way to get the srcset for optimized images. The slot usage I was looking for was something like this:
<nuxt-image sets="300,300:600,600:900" format="webp" src="/nuxt-icon.png">
<template v-slot="{placeholder, src, set, height, width, sizes}">
<v-img :lazy-src="placeholder"
:src="src"
:srcset="set"
:height="height"
:width="width"
sizes="sizes" />
</template>
</nuxt-image>
Or maybe for optimizing a background image:
<nuxt-image sets="300,300:600,600:900" format="webp" src="/nuxt-icon.png">
<template #default="{ src }">
<div
:style="`
position: relative;
overflow: hidden;
background-size: cover;
background-image: url('${src}');
`"
/>
</template>
</nuxt-image>
from image.
As you may notice, the module is under development and the feather set of utility does not complete. That's why we don't mention it in docs.
I am looking for a simple way to get the srcset for optimized images
The utility will be the solution for it
Please wait for the first alpha release of the module. It will be anounced by Nuxt official account . Until then do not use image module in production.
from image.
@farnabaz Thanks, I am looking forward to the alpha release.
from image.
Is a utility for this use case now present? I am trying to integrate images with vuetify and nuxt-image right now.
from image.
Is a utility for this use case now present? I am trying to integrate images with vuetify and nuxt-image right now.
I think what you're looking for is here — there's an example using Vuetify, too:
https://image.nuxtjs.org/api/$img
from image.
Related Issues (20)
- Just don't work HOT 1
- img render size issue
- Providers not being built into nuxt output
- Nitro preset 'Azure' gives 404 HOT 3
- Nuxt Image and Cloudinary Provider- Animated GIF support
- sizes based on viewport-height unit
- Unable to read static Image files in /public using IPX as provider on vercel, seeing [404] [IPX_FILE_NOT_FOUND] error HOT 3
- Images appear to double up? HOT 1
- Incorrect deploy-manifest.json when building for AWS Amplify?
- Massive issue with `sizes` affecting Tailwind and other frameworks.
- netlify image CDN uses `jpeg` while only `jpg` is valid
- Provider Hygraph has a new Asset API that breaks the implemented provider settings HOT 1
- Unable to execute generate or build successfully(ERROR: Exiting due to prerender errors) HOT 1
- useImage() in combination with Sanity provider generates a broken, incorrect image path
- The NuxtImg and NuxtPicture components can't be dynamically imported anymore HOT 1
- See error if src is undefined. HOT 3
- random 403 errors Ipx HOT 1
- Alias configuration is invalid
- Placeholder slot for `<NuxtImg>`
- Feature Request: option to disable image density warning HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from image.