Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions /

How to resize only big images? [snippet won't work]


Reply


2 Posts   734 Views

Avatar
benni91

Community Member, 72 Posts

28 August 2011 at 1:05pm

Hi,
i found this http://www.ssbits.com/tutorials/2011/improving-image-quality-by-preventing-correctly-sized-images-being-resized/ snippet but it won't work :/

so is there any other possibility to prevent correctly sized images being resized?

While using the searchfunction i found something about the gd functions. but i don't understand them :/

can someone help me?

Avatar
zenmonkey

Community Member, 532 Posts

29 September 2011 at 8:34am

If the images are sized correctly, you should be calling them form the template using $Image with no dot functions (.SetWidth etc). Now if you're unsure if you're users will provide correct images you can always create a new function that checks the image size and only resize if its bigger than a specific size.