Array format to populate a Media Gallery Field using wixData

I didn’t work for me with just ‘type’ and ‘src’. I got it to work by adding all of these properties.

// artImages is the database field key
values['artImages'] = $uploadGallery.items.map(({description, slug, alt, src, title, type, settings}) => ({
        description,
        slug,
        alt,
        src,
        title,
        type,
        settings
    }))
1 Like