flamelink / flamelink-js-sdk

🦊 Official Flamelink JavaScript SDK for both the Firebase Realtime database and Cloud Firestore
https://flamelink.github.io/flamelink-js-sdk
MIT License
43 stars 5 forks source link

Populate media with specific size #87

Closed MLoth closed 5 years ago

MLoth commented 5 years ago

The population of a specific media size doesn't seem to work in version 1.0.0-alpha.19. I have a repeater field that contains an image. This does populate the image (I get the url property), but not that specific size.

const data = await app.flamelink.content.get({
    schemaKey: 'content',
    fields: ['id', 'name', 'repeaterField', 'price'],
    populate: [
        {
            field: 'repeaterField',
            subFields: [
                {
                    field: 'coverImage',
                    size: {
                        width: 190,
                        height: 190,
                        quality: '0.99'
                    },
                },
            ],
        },
    ],
});

The documentation isn't very clear on the way this new size would be returned. Where would the smaller size be populated? In the url property or inside the sizes array?

ngmiduc commented 5 years ago

I think that there is something not working properly. I also have some troubles to get the right size population.

ngmiduc commented 5 years ago

40

jperasmus commented 5 years ago

Hi @ngmiduc and @MLoth, I'm looking into this issue now and will let you know as soon as I have more for you.

jperasmus commented 5 years ago

Can you please upgrade to 1.0.0-alpha.20 and try again?

MLoth commented 5 years ago

Sweet! It works 👍🏼.