Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix: Only show available image sizes #19301
Currently, we are always showing the image size picker with all available sizes on the gallery and image block even if a size (or no size at all) is available. This means that on images inserted by URL, where it is not possible to choose a size we were still showing a size picker even though it does nothing.
This PR updates the computation of the available sizes to take into account what sizes are in fact available for the image, or available for some image on the image block.
How has this been tested?
I inserted an image by URL.