Automattic / Automattic/jetpack
Image Compare Block: Allow setting max height
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
#### Is your feature request related to a problem? Please describe.
Image Compare fills the width but on a wide content area, that makes both images not fully visible (as well as the arrow handle if _really_ wide) to compare all the way from top to bottom.
#### Describe the solution you'd like
I'd like a setting added to the block to set a max height, possibly with "no more than filling the screen height" as the sane default with the option to set a max pixel height (e.g. 600)
I saw a related request to not upscale images, which would be related because the Image Compare should have an option for height to be "height of shortest image" or "height of tallest image, upscaling the smaller"
#### Describe alternatives you've considered
Different image comparison plugin, such as [this one](https://codecanyon.net/item/noo-before-after-ultimate-before-after-plugin-for-wordpress/22728974) I previously purchased but didn't get updated to support blocks.
#### Additional context
Started from: https://wordpress.org/support/topic/image-compare-block-cannot-swap-out-images-or-restrict-height/#post-14514935
Related:
* https://github.com/Automattic/jetpack/issues/15953
* https://github.com/Automattic/wp-calypso/issues/47681
Contributor guide
Research direction
Start by locating the Image Compare block implementation and its existing block settings. Review the requested max-height behaviors, including a viewport-based default and an optional pixel limit; done means the block can constrain its height while remaining usable for comparing both images.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, wordpress
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100