Skip to content
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

Preset option is not taken into account #261

Closed
clemcode opened this issue May 12, 2021 · 5 comments
Closed

Preset option is not taken into account #261

clemcode opened this issue May 12, 2021 · 5 comments

Comments

@clemcode
Copy link
Contributor

Hi,

here are details about the preset option problem I faced :

What happens ?

The hero preset is found (no "unfound preset" error) but doesn't modify the image (image keeps its initial size)

Reproduction

<template>
  <nuxt-img preset="hero" src="/my-image.jpg" />
</template>
/* nuxt.config.js */

export default {
  image: {
    presets: {
      hero: {
        modifiers: {
          fit: "cover",
          format: "jpg",
          width: 800,
          height: 300,
        },
      },
    },
  },
};
@pi0 pi0 closed this as completed in bc4fc23 May 12, 2021
@pi0
Copy link
Member

pi0 commented May 12, 2021

Thanks for issue. Should be fixed in next release.

@lucadalli
Copy link

@pi0 I am still facing this issue on 0.4.9

@pi0 pi0 reopened this May 15, 2021
@pi0
Copy link
Member

pi0 commented May 17, 2021

#274 should possibily fix this as well (trying before close)

@pi0
Copy link
Member

pi0 commented May 17, 2021

It should be finally fixed in 0.4.10+ (I could locally confirm). Please ping here if still preset is not working.

@pi0 pi0 closed this as completed May 17, 2021
@clemcode
Copy link
Contributor Author

clemcode commented Jun 9, 2021

Hi,

the sizes property doesn't seem to work in presets.

Nuxt version: 2.15
Nuxt Image version: 0.4.14
CodeSandbox (l.39 and below)

Output from <nuxt-img/> when a preset with sizes is applied:

<img src="/_ipx/featured.jpeg?sizes=sm:90vw+md:80vw+lg:30vw" alt="Clothes displayed on bed">

procrates pushed a commit to procrates/nuxt-image that referenced this issue Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants