> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: updateGalleryItem(identifiers: UpdateGalleryItemIdentifiers, item: UpdateGalleryItem, options: UpdateGalleryItemOptions) # Method package: wixProGalleryBackend # Method menu location: wixProGalleryBackend --> proGallery --> updateGalleryItem # Method Link: https://dev.wix.com/docs/velo/apis/wix-pro-gallery-backend/pro-gallery/update-gallery-item.md # Method Description: Updates a media item in a specified gallery. Only the fields in the `item` object parameter can be updated. Specify which fields to update. Unspecified fields remain the same.
__Important:__ When updating `image` items in your gallery, the images must be uploaded to the [Wix Media Manager](https://support.wix.com/en/article/wix-media-uploading-media-to-the-media-manager) first as the `imageInfo` parameter currently only supports the Wix media URL.# Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Update a gallery item ```javascript import { proGallery } from 'wix-pro-gallery-backend'; /* Sample galleryId value: 'af5c3670-9b0f-4d86-b3b9-19fe62006c39' * * Sample itemId value: '813def66-0f0b-40b7-a9df-c731345a926f' * * Sample title value: 'My Updated Item Title' */ export async function myUpdateGalleryItemFunction() { try { const updatedGalleryItem = await proGallery.updateGalleryItem({galleryId, itemId}, {title}); const title = updatedGalleryItem.title; console.log('Success! Updated the gallery item:', updatedGalleryItem); return updatedGalleryItem; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to: * { * "_createdDate": "Mon Feb 20 2021 15:22:15", * "_id": "813def66-0f0b-40b7-a9df-c731345a926f", * "_updatedDate": Tue Mar 30 2021 15:23:22, * "description": "This is the first item in my gallery.", * "sortOrder": 1657439075188, * "title": "My Updated Item Title", * "type": 'VIDEO', * "video": { * "type": 'YOUTUBE', * "videoInfo": 'https://www.youtube.com/results?search_query=uplifting+upbeat+music', * "duration": 2000 * } * } */ ``` ---