Image zoom in

I have a background image for the homepage. When the page width becomes smaller than 800px, a different image is displayed. However, this image is way too zoomed in, making it hard to see anything. When I inspect it using the developer tools, everything looks fine. (https://pastebin.com/h9Kd2538)
Pastebin
function scrollToContent() { const contentSection - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
3 Replies
kapa.ai
kapa.ai4w ago
Hi @HoneyBear. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the information provided in your question, it seems you're experiencing an issue with image zooming on your Nuxt website. While I don't have specific information about your particular setup, I can provide some general guidance on how to handle image zooming and responsiveness in Nuxt using the Nuxt Image module. The Nuxt Image module provides a zoom modifier that can be used to control image zooming. This feature is available with certain providers, such as TwicPics. Here's an example of how you can use the zoom modifier:
<NuxtImg
provider="twicpics"
src="/your-image.jpg"
:modifiers="{zoom:1.5}" <!-- zooms into image by a factor 1.5 -->
/>
<NuxtImg
provider="twicpics"
src="/your-image.jpg"
:modifiers="{zoom:1.5}" <!-- zooms into image by a factor 1.5 -->
/>
TwicPics zoom documentation (https://image.nuxt.com/providers/twicpics#zoom) You can adjust the zoom factor to suit your needs. A value of 1 would be no zoom, while values greater than 1 zoom in, and values between 0 and 1 zoom out. For responsive images, you might want to consider using the sizes attribute along with different width and height values for different screen sizes. This can help ensure that the appropriate image is displayed at different viewport widths. If you're using a different image for smaller screen sizes, you might want to ensure that the aspect ratio and focal point of this image are appropriate for the smaller display. You can use the fit property to control how the image fits within its container:
<NuxtImg
src="/your-image.jpg"
width="800"
height="600"
fit="cover"
/>
<NuxtImg
src="/your-image.jpg"
width="800"
height="600"
fit="cover"
/>
NuxtImg documentation (https://image.nuxt.com/usage/nuxt-img) If you're still having issues, you might want to check if you're using any CSS that could be affecting the image display, particularly for smaller screen sizes. Sometimes, CSS rules can cause unexpected zooming or cropping of images. Without more specific information about your setup and the exact provider you're using, it's difficult to provide a more tailored solution. If you continue to have issues, you might want to share more details about your Nuxt configuration, the image provider you're using, and any relevant CSS. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai4w ago
<@789592192553058337> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
HoneyBear
HoneyBearOP4w ago
if i emulate it, than it works fine, but if i publish the website than it isn't working.
Want results from more Discord servers?
Add your server