Add lightbox functionality to Post Featured Image block #69279
Labels
[Block] Post Featured Image
Affects the Post Featured Image Block
[Type] Enhancement
A suggestion for improvement.
Overview
The Image block in Gutenberg includes a native lightbox functionality that allows users to expand images in a modal view. However, this functionality is not available in the Post Featured Image block, even though it would be equally useful in this context.
Current Behavior
Proposed Enhancement
Add the same lightbox functionality that exists in the Image block to the Post Featured Image block. This would:
Use Case
When users view a single post, they often want to see the featured image in more detail. Currently, they have two less-than-ideal options:
Having lightbox functionality would solve this by allowing users to:
Technical Details
The Image block already implements this functionality through:
The same implementation could be extended to the Post Featured Image block with minimal modifications, as both blocks handle similar content types.
Example Implementation
I've successfully implemented this functionality as a custom solution. Here's the approach used:
The text was updated successfully, but these errors were encountered: