CodeIgniter Forums
Images with CI? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Images with CI? (/showthread.php?tid=56211)



Images with CI? - El Forum - 12-03-2012

[eluser]Horvat[/eluser]
Hello! I need help with image lib.
I have image filenames in database and images in '/img' folder, I need example how to show all images in same resolution('thumbs') , and how to get them in view?


Images with CI? - El Forum - 12-03-2012

[eluser]PhilTem[/eluser]
It would be easier if you had the resolution of your images store in the database as well, but since I assume you don't have you might want to have a look at

getimagesize()

which you should use while looping over every file (i.e. image) in the /img/ directory.


Images with CI? - El Forum - 12-03-2012

[eluser]Aken[/eluser]
You should modify and save images into all needed formats upon upload. That way when you need to gather images, you only need to retrieve the file names from the DB, not perform additional logic to get them in the proper size.


Images with CI? - El Forum - 12-04-2012

[eluser]Horvat[/eluser]
I don't need upload, just view (in this current app)