> 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: deleteGalleryItem(identifiers: DeleteGalleryItemIdentifiers, options: DeleteGalleryItemOptions) # Method package: wixProGalleryBackend # Method menu location: wixProGalleryBackend --> proGallery --> deleteGalleryItem # Method Link: https://dev.wix.com/docs/velo/apis/wix-pro-gallery-backend/pro-gallery/delete-gallery-item.md # Method Description: Deletes a media item from a gallery. When a gallery item is deleted, the deleted gallery item is no longer returned when calling the [`listGalleryItems()`](/pro-gallery/list-gallery-items) function. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Delete a gallery item ```javascript import { proGallery } from 'wix-pro-gallery-backend'; /* Sample galleryId value: 'f7cca0a0-5bb5-44c2-a0f8-6496430b3154' * * Sample itemId value: '5f3eae0d-cd93-47f8-af56-1442f37cf9bf' */ export async function myDeleteGalleryItemFunction(galleryId, itemId) { try { const deletedGalleryItemId = await proGallery.deleteGalleryItem({galleryId, itemId}); console.log('Success! Deleted the gallery item:', deletedGalleryItemId); return deletedGalleryItemId; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to: * { * "itemId": "5f3eae0d-cd93-47f8-af56-1442f37cf9bf" * } */ ``` ---