In gallery mode, attempting to automatically detect whether:
- PageImages is enabled
- If it is, if a non file page has a PageImage
If both are true, it should try to use the PageImage for the gallery and the page name for the image caption.
Right now, it also makes the page name in the caption a link, and points the image link to the page as well. Could not figure out how to make this behavior optional.
Gallery mode for file pages should be untouched.
Notes:
- This behavior is similar, but not a perfect match to DPL_(Wikimedia)'s PageImages in gallery mode.
- Unsure if some of the solutions are the most optimal. The way its detecting if PageImages is enabled is a bit clumsy.
Co-authored-by: CosmicAlpha <cosmic.alpha24@gmail.com>