Upload and resize image
How does this work with Data Bridge? I have a form with a file field that will be used to upload images for a gallery, but I want the image being uploaded to be resized as it's uploaded.
How does this work with Data Bridge? I have a form with a file field that will be used to upload images for a gallery, but I want the image being uploaded to be resized as it's uploaded.
The recommended technique is to actually not resize as it is uploaded, but use image resizer to resize on demand.
Imagine if you had thousands of images uploaded and resized to fit a particular design and then decided to alter the design slightly and needed a new image size, or wanted to offer more than one gallery view with different image sizes. If you resize on upload that could be a real pain.
By using image resizer, if you decide to change designs later you can just change the image dimension and an optimized image will be created and cached the next time the page is viewed. You get all of the benefits, but you won't be stuck with the size you originally resized to.
Ahh - thanks for that, Ray. So I would use resizer on my gallery page to fit the dimensions desired?
That is correct. Upload the full sized image and store the location in your database. Then use image resizer on any page you want the image displayed, like the gallery page.
Ray,
Good point.
How would this work if you stored images in a database?
If you went to delete a record that contained an image, how would it know what the file name of the Image Resizer file was to delete it?
Cheers
Ian
At this time, there is not a way to delete the cached images, though this is a feaature we hope to implment in the future, though I cannot say exactky when this feature will be available.
I want to make sure I understand because I have a similar question to Ian. I am using a dynamic photo gallery, so there really is no image on the page when I open it in DW. It seems that image resizer will resize the image to fit within its container, so what I need to do for this dynamic gallery is to make sure that the dynamic image is placed within a sized container, and then apply the resizer to that dynamic image tag?
So, each time the image tag changes source, the resizer will kick in?
yes, that is correct.
based on the src of the image tag, and the height and width settings, image re sizer will automatically create a new copy of the image using the image tag dimensions.
Here's the problem - the gallery is a javascript-based gallery. The image placed in that location is written to the page interactively. Since resizer is based on server scripting, it cannot possibly affect these client-side image determinations, right?
Have I answered my own question?
it may be able to do this depending on how the gallery is created.
most galeries load the image in a hidden image tag.
can you send a link to the gallery you are using? this will give us more info on how possible it is to use Image resizer.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.