The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End php resize image

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #43518

    I am working in a cms project where clients upload the photos, my problem is to resize those image to sme size…without cropping the image in php. any help??

    Kitty Giraudel

    Are you talking about thumbnail re size or the actual image? There are basic options for cropping in the media area if that helps. Would reduce the image file size instead of scaling all of them down. Otherwise you can just put a max-width: ///px and have CSS scale them down. Or rather have the img { max-width: 100%; } and then the container be a max-width: 900px; or whatever, so when you resize the browser the images will still be responsive.

    At least I think thats how it would work.


    If you’re asking how to literally make a new, resized image in PHP, look at [imagecopyresampled()]( It’s annoyingly complicated, so spend time studying it. It might be best to make sure you can get the examples working correctly before trying your own implementation.


    @HugoGiraudel: I dont think cliping the image will be a good idea here.

    : yeah its thumbnail but in my case those are the same image just want to resize

    the thing is that, it will be easy if the image uploaded by client i.e of any size can adjust in the screen with small gap or no gap.


    I like this

    also the animation of this link is cool

    i want the image to be resized with max-width and with aspect ratio..
    any help??


    There is a php script that I have used in the past that may do the trick. It’s easy to setup and from what I have read might be what you are looking for.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Back End’ is closed to new topics and replies.