Thank you so much, I really appreciate this. However, the way it is implemented is a bit restrictive for my intended use. It doesn’t matter with the max size if the value is the same for width and height. If it’s bigger than 3000px on any side, it’s too big, period.
However, let’s say that I set min size at 2000px because I want to be able to display a high quality image from the album at full width on my home page (it’s a photo club). A user could upload an image of 2200 x 1800, for example which I could use, but the new function rejects it because one of the sides is “smaller” than 2000 x 2000. That’s the message it returns in such cases. I need an image with at least one side bigger than the min size in the settings to be accepted.
I could try to go with a min value for the smaller size, hoping that the longer side will be over that value, but if someone uploads a panoramic image, for example, there is no way that I can guess the ratio to set a minimum height that would allow the desired width to be accepted as well… If I set my min at 1600 thinking that the width of a standard image should reach 2000, a panoramic image of 1600 x 5000 would then get rejected because of the max size… This pano would get accepted if only the size of the longer side could be set at a minimum of 2000 px and not its height.
Is there a way to do that? Thank you so much, your service is fantastic!
I’m learning to code, and I haven’t touched PHP yet, but I will this year, and I love looking at the changes you make. Great learning!