Wondering if there is any backend or frontend function to automatically resize images, say I upload one image that is 500px X 500px, and I want that image to appear as a thumbnail of 150px X 150px and 400px X 400px as a large image, without having to resize them prior to uploading. Any suggestions, modules, code or ideas. Could I use javascript to generate the image within Miva...Thanks
Announcement
Collapse
No announcement yet.
Image Resizing Function
Collapse
X
-
Re: Image Resizing Function
Miva Merchant doesn't do it, but other apps do. This requires the use of either ImageMagic or gd libraries being installed on the server - and the upload script to automatically resize images as they are being uploaded to the server. Keep in mind that this typically requires uploading one image at a time, rather than uploading let's say 100 or 1000 images at a time via FTP. In the later scenario it's much easier to do the work off-line and generate thumbnails and other images before batch-uploading them to the server.
There are many different tools that can do batch file resizing in no time. Here's a cool tiny Mac app called ResizeMe: http://resize-me.com (you can get 50% off the price if you buy it in the next hour or so at MacZot!). Or, if you already use something like Photoshop, you can automate the repetitive task of creating thumbnails by creating a 'droplet' to do this for any number of images on your computer.
-
Re: Image Resizing Function
HTML doesn't "resize" images - it can only display them at different resolutions than the actual file is. In other words, you can specify to display an image at 128x128 pixels, but if the image came from a 12 megapixel camera (4256x2832 pixels) - it will still be some 10MB in size rather than 5KB and till take a LOT longer to download than a properly resized 128x128 pixel thumbnail. Not to mention, your monthly hosting bill will be significantly higher if you serve such large images as "thumbnails", since you'll be paying for bandwidth at the 10MB per thumbnail rate, rather than 5KB.
Comment
-
Re: Image Resizing Function
Check out phpThumb. It will allow you to re-size images on the fly and have them cached for speedy load times. Cool thing is that it will also re-size proportionally.--
Scott Zielinski
-----------------------------
Sebenza.com - Miva Merchant Partner
MIVA Development & MIVA Modules
SearchSpring.net - Strategic Miva Merchant Partner
How many sales is your search page losing?
Comment
-
Re: Image Resizing Function
If you name your images using the product code, you don't ever have to enter them at all :) Just use the SMT product code token to pull them into your html img tag when you need them. Lets you use images in all sorts of places where they aren't typically available, too (thumbnails in the basket, etc).
Granted, that works best if you do it that way from the start.
Comment
-
Re: Image Resizing Function
It won't automatically resize them, although resizing doesn't have to be hard. You don't even need to create a photoshop droplet, just download a free program like Easy Thumbnails and use that.
All you'd need to do then is, anywhere you want to show an image, use code something like this:
Code:<img src="filepath/&mvt:product:code;.jpg" alt="&mvt:product:name;"> <img src="filepath/&mvt:product:code;-thumb.jpg" alt="&mvt:product:name;"> <img src="filepath/&mvt:product:code-400.jpg" alt="&mvt:product:name;">
Makes it easy to change out product photos too, if you ever need to do that. Just name the new photos with the product codes and upload via ftp. No need to mess with your Miva settings.
Comment
Comment