prismicio-community / eleventy-plugin-prismic

Eleventy plugin and shortcodes to fetch and present Prismic content
https://github.com/prismicio-community/eleventy-plugin-prismic/blob/master/DOCUMENTATION.md
MIT License
98 stars 5 forks source link

Image Shortcode Properties Issue #10

Closed ryangittings closed 2 years ago

ryangittings commented 2 years ago

Hi,

I'm using the following shortcode:

{% image post.data.featured_image, { loading: "lazy", pixelDensities: [1, 2] } %}

If the following properties are used, the class gets [object Object] and none of the properties actually work.

Cheers!

Versions

lihbr commented 2 years ago

Hey there! Sorry for the misleading documentation.

The documentation available on master is for the new plugin version coming up (1.0.0), which is currently in beta.

You can upgrade to it this way: npm install --save eleventy-plugin-prismic@1.0.0-beta.2 and your code should work (recommended), if you want to stay on version 0.2.1 checkout the 0.2.x documentation here: https://github.com/prismicio-community/eleventy-plugin-prismic/blob/5d3910fc06d3aafd7ef8db7b939bff98bb96d469/DOCUMENTATION.md

Let me know if that helps! Sorry again for the misleading info~