RafidMuhymin / astro-imagetools

Image Optimization tools for the Astro JS framework
astro-imagetools-docs.vercel.app
MIT License
407 stars 44 forks source link

astro imagetools Picture and BackgroundImage tags not works after upgrade packages #175

Open nothinghalosix opened 12 months ago

nothinghalosix commented 12 months ago

<Picture loading="lazy" src="/images/slider/Header01.jpg" alt="&copy; " width={2400}/> same with BackgroundImage tag

[astro-imagetools] data-astro-cid-juhulabb is not a valid Picture Config Option

package.json "@astrojs/sitemap": "^3.0.3", "@astrojs/tailwind": "5.0.3", "astro": "^4.0.2", "astro-imagetools": "^0.9.0", "date-fns": "^2.30.0", "sass": "^1.69.5", "tailwindcss": "^3.3.6"

trinkel commented 11 months ago

Same issue with a new install.

package.json

"dependencies": {
    "@astrojs/check": "^0.3.1",
    "astro": "^4.0.3",
    "astro-imagetools": "^0.9.0",
    "typescript": "^5.3.3"

index.astro

<BackgroundImage
    src="/src/images/holidaybg-horz-5710x2958-24.png"
    breakpoints={[200, 400, 800, 1600]}
    backgroundSize="contain"
    fallbackFormat="png"
    artDirectives={[
        {
            src: "/src/images/holidaybg-vert-3197x4848-24.png",
            media: "(orientation: portrait)",
            backgroundSize: "cover",
            backgroundPosition: "right bottom",
        }
    ]}
/>

Error (npm run dev)

[astro-imagetools]  data-astro-cid-j7pv25f6  is not a valid BackgroundImage Config Option