Forums

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
    Posts
  • #43518
    devil3682116
    Participant

    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??

    #128914
    Kitty Giraudel
    Participant
    #129339
    Jeager
    Member

    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.

    #129397
    __
    Participant

    If you’re asking how to literally make a new, resized image in PHP, look at [imagecopyresampled()](http://php.net/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.

    #129477
    devil3682116
    Participant

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

    @Jeager
    : 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.

    #129479
    devil3682116
    Participant

    I like this
    http://masonry.desandro.com/demos/images.html

    also the animation of this link is cool
    http://isotope.metafizzy.co/demos/layout-modes.html

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

    #129709
    Dheer
    Member

    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.

    https://github.com/lencioni/SLIR

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