Skip to content

Commit f74149c

Browse files
MustafabharmalMustafabharmalramonjdjorgefilipecostathenadz
authored andcommitted
Fix: MediaUpload gallery prop ignores allowedTypes (WordPress#78257)
Unlinked contributors: bagseye. Co-authored-by: Mustafabharmal <mustafabharmal@git.wordpress.org> Co-authored-by: ramonjd <ramonopoly@git.wordpress.org> Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org> Co-authored-by: thenadz <danrossiter@git.wordpress.org>
1 parent eb3bc69 commit f74149c

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎packages/media-utils/CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Bug Fixes
66

77
- Declare `react-dom` and `@types/react-dom` as peer dependencies, forwarding the peers of `@wordpress/element`, so strict package managers such as Yarn PnP can resolve them ([#83765](https://github.com/WordPress/gutenberg/pull/83765)).
8+
- `MediaUpload`: Fix `allowedTypes` being ignored when `gallery` prop is `true` ([#78257](https://github.com/WordPress/gutenberg/pull/78257)).
89

910
## 5.56.0 (2026-09-23)
1011

‎packages/media-utils/src/components/media-upload/index.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ class MediaUpload extends Component {
350350
multiple,
351351
selection,
352352
editing: !! value?.length,
353+
...( allowedTypes && { library: { type: allowedTypes } } ),
353354
} );
354355
wp.media.frame = this.frame;
355356
this.initializeListeners();

0 commit comments

Comments
 (0)