Board Thread:General Discussion/@comment-24764132-20191028075510/@comment-9605025-20191111175959

As long as you restrict the height of the images, there is no way to know for sure what the width will be. Similarly, if you restrict the width of the images, there is no way to know for sure what the height will be. The issue is that it depends on the individual dimensions of each image. If you could get that information, you could go through and manually calculate the result. However, as far as I know, there is no way to do that with MediaWiki alone. It might be doable with Lua but I am not sure as I have never actually used Lua and am not aware of its limitations. For sure, you should be able to do it using custom JS but that would require quite a bit of development.