Customizing SMF > Modifications and Packages

Resize Attached Images (Updated for 2.0 RC4)

(1/61) > >>

Kays:
Link to Mod

Automatically resizes attached images to the same dimensions as for posted images.

This mod will resize all attached .jpg, .png, .gif, or .bmp images save them as .jpg. Either as they are being uploaded, or for existing images, when they are viewed. As well, any existing .png, .gif, or .bmp images will be converted to .jpg.

Note:

Due to a problem with the mod creating extra thumbnails. I would advise anyone using V1.1 to update to V1.2. As well, upload this script the root of your forums and access it by url to clean up any extra thumbnails

V1.1 Initial release
V1.2 Fixed a bug where extra thumbnails were created
V1.3 Updated for SMF 2.0
V1.4 Fixed a bug with files not being renamed if encrypted file names was enabled before SMF 1.1.9 or 2.0 RC1.1.
V1.5 Minor fixes

V2.0
 
Features added in the Attachment settings in the Admin CP.
 - The ability to set a max width and height for attached images separately rather than using the values for posted images
 - The ability to set the jpeg compression factor.
 - The option to save thumbnail either as .jgp or .png. independent of the avatar setting.
 - Change existing  .png images back to .jpg.

V2.0.1 Added Russian & Russian-utf8. Thanks to Bugo.
V2.1.1 Fixed a bug with the width on resized images.
V2.2.1 Updated for 2.0 RC4

gourav:
Hey dear great mod :) i was in search of something like this
Well can you clear out one thing , Will this mod resize the images
everytime it will be loaded or it will permanently replace the uploade
i.e. will Resize ythe original pic forever?

and can v manually choose the resize dimensions

Kays:
Hi, this mod is for those who wish to cut down on server space. So it does permanently resize all attached images.

The settings are the same as for posted images. Admin CP > Features and Options > Max width of posted pictures, Max height of posted pictures

ddarrell:
Very nice, Thank You.

Successful install on 1.1.10.

 :)
 

avf:
I installed on SMF  but strangely the attachment folder has swelled upto 44000 files and 500MB with
names like

1536_164d9fd9aa92e415a370338257c4031f54fdd2a1
1047_IMG_4352_resize_jpg0ae79bd3f4292253353258c7b2b93b2a
1050_IMG_4355_resize_jpg2a1fcff297c2c737ddc2e5389abd5196

can you tell if it is duplicating the files or what is happening. I don't have that many attachments in my forum. Please advice I am running out of space on my server.

It appears to have created a huge number of small files upto 10kb on just one day so I know they are not new attachments and the total seems to have jumped from 2000 odd attachments to 44000 now.

I am also using the highslide viewer mod. is it causin the image to be resized multiple times as it is viewed ? this mod http://custom.simplemachines.org/mods/index.php?mod=1450

Navigation

[0] Message Index

[#] Next page

Go to full version