class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
Hello, I'm facing a tricky situation and I don't know if upload.cass.php can handle it. I'm building an administration panel for a portfolio website, and I need the uploaded images to be resized to fit into the sliders displayed on the frontend. I have a fixed slider width (1120px), but I would like to have a variable height (which maximum would be 800px)... I need all the images to be resized to fill this width (using image_ratio_fill for the portrait orientation ones). If I use image_ratio, image_ratio_fill, image_x and image_y, all my images are resized, based on image_x and image_y values (which is the expected behavior). But I would like my landscape oriented images no to use image_ratio_fill and to have a "fluid" image_y value. So far, I haven't been able to achieve that (if I use image_ratio_y, the landscape images are resized as I want them to be, but the portrait ones are also resized to the same width, which is far too big). In brief, I'm looking for a way to emulate a sort of "image_ratio_fill_y" to only fill if my images width is smaller than 1120px. I hope I made myself clear, please tell me if I haven't. Thanks in advance and best regards, PolReply
I'm facing a tricky situation and I don't know if upload.cass.php can handle it.
I'm building an administration panel for a portfolio website, and I need the uploaded images to be resized to fit into the sliders displayed on the frontend.
I have a fixed slider width (1120px), but I would like to have a variable height (which maximum would be 800px)... I need all the images to be resized to fill this width (using image_ratio_fill for the portrait orientation ones).
If I use image_ratio, image_ratio_fill, image_x and image_y, all my images are resized, based on image_x and image_y values (which is the expected behavior). But I would like my landscape oriented images no to use image_ratio_fill and to have a "fluid" image_y value.
So far, I haven't been able to achieve that (if I use image_ratio_y, the landscape images are resized as I want them to be, but the portrait ones are also resized to the same width, which is far too big).
In brief, I'm looking for a way to emulate a sort of "image_ratio_fill_y" to only fill if my images width is smaller than 1120px.
I hope I made myself clear, please tell me if I haven't.
Thanks in advance and best regards,
Pol