0

I want to resize the images during upload to a small size so that they take less time while loading on the website.

And I also want to maintain the aspect ratio so that a portrait image doesn't get stretched and a landscape image doesn't get squeezed.That is without changing the actual dimensions of the image.

Akhil Yadav
  • 97
  • 1
  • 10

2 Answers2

0

First convert your images to Jpeg, gif and png images as these are compressed images.

In addition you can use ImageMagick to compress the image: Recommendation for compressing JPG files with ImageMagick

Community
  • 1
  • 1
Garry
  • 4,493
  • 3
  • 28
  • 48
0

An Image Manipulation class exists in CodeIgniter and can solve Your problem. Just read the official guide to learn more.

Egor Sazanovich
  • 4,979
  • 5
  • 23
  • 37
  • @AkhilYadav if You'll have any questions after reading the docs, be free to ask, if not and this answer covers Your question, please, don't forget to mark it as the solution. – Egor Sazanovich Jul 23 '15 at 16:18