PDA

View Full Version : Is there an SQL query I can run that can do this?


MaDCaT75
12-31-2003, 02:24 AM
Is there an SQL query that I can run that will turn ALL images that are over say 640 x 480 into thumbnails about 150 x 150? Some images are messing up my forum format.

Dean C
12-31-2003, 11:34 AM
Well not a query as such. You'd need the GD library along with PHP script to loop through all the attachments to do it. But still that would not fix the [img] tag problem.

Xenon
12-31-2003, 01:57 PM
there was a hack out there, which resizes images over a certain resolution.
ok, it just uses html resize, so you won't save bandwith, but at least the forumdesign would fit again :)

Dean C
12-31-2003, 02:08 PM
You could always change postbit_attachmentimage to have width and height attributes in the img tag too

filburt1
12-31-2003, 02:23 PM
Remember that modifying the image tag to use resizing HTML code may result in a destroyed aspect ratio and terrible quality. Also the file size itself will be the same.

MindTrix
12-31-2003, 03:49 PM
Im pretty sure there are numerous hacks here for images, either it be to restrict the size of attached images, restrict the size of linked images etc etc

This hack limits the size of uploaded images

https://vborg.vbsupport.ru/showthread.php?t=59410

And there are other links in the thread.