aHMAD_SQaLli Posted November 10, 2015 Share Posted November 10, 2015 Hello sorry for the English if it's bad... I'm going to use facebook as an example, if I uploaded my profile picture 1.9Mb 1920x1200, and then I went to the home page, in the top blue navbar I will find that the profile picture size is just 2.24Ko and it's resolution is 36x36. so I'm wondering how this can be done using php ? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/299423-reduce-big-images-resolution-and-size-in-php/ Share on other sites More sharing options...
QuickOldCar Posted November 10, 2015 Share Posted November 10, 2015 (edited) You can display any image a certain size by just setting the width or height to auto, then set a desired max-width or max-height and will fit there. If you actually want a smaller sized image would need to make a resize script keeping the image to the same scale and save the images. http://code.tutsplus.com/tutorials/image-resizing-made-easy-with-php--net-10362 https://github.com/JamesHeinrich/phpThumb Edited November 10, 2015 by QuickOldCar 1 Quote Link to comment https://forums.phpfreaks.com/topic/299423-reduce-big-images-resolution-and-size-in-php/#findComment-1526131 Share on other sites More sharing options...
Jacques1 Posted November 10, 2015 Share Posted November 10, 2015 ImageMagick Or, if you're using some shared host where you cannot install anything, there's the GD extension. Quote Link to comment https://forums.phpfreaks.com/topic/299423-reduce-big-images-resolution-and-size-in-php/#findComment-1526133 Share on other sites More sharing options...
aHMAD_SQaLli Posted November 10, 2015 Author Share Posted November 10, 2015 thank's Quote Link to comment https://forums.phpfreaks.com/topic/299423-reduce-big-images-resolution-and-size-in-php/#findComment-1526134 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.