Current position: Home > Default > Batch Resize photos Larger than a certain size.
Batch Resize photos Larger than a certain size.
I am asking because our server has over 40,000 photos all over the place and I would like to reduce the space they take on the server.
Also using getFiles() without a file mask will get all files and folders in the source folder. You will need to make sure it is an image file before trying to open in Photoshop to resize.
I think the function below would be a better way to determine if the file needs resizing. It tries to get the XMPMetadata to determine width and height. If that fails because the file does not have metadata it gets the size from Bridge.
var file = new File('~/desktop/_SLP7637.jpg');
var resize = needsResizing( file );
var resizeStr = ''
resize? resizeStr = 'needs resizing': resizeStr = 'does not need resizing';
alert(file.fsName+" "+resizeStr);
function needsResizing( file ){
try{
loadXMPLibrary();
var xmpf = new XMPFile( file.fsName, XMPConst.UNKNOWN,
XMPConst.OPEN_FOR_READ );
var xmp = xmpf.getXMP();
xmpf.closeFile();
var dim = xmp.getProperty( XMPConst.NS_EXIF, 'PixelXDimension', XMPConst.STRING)+','+xmp.getProperty( XMPConst.NS_EXIF, 'PixelYDimension', XMPConst.STRING);
dim = dim.split(',');
unloadXMPLibrary();
if(dim=="undefined,undefined"){
var dim = undefined;
var res = undefined;
var bt = new BridgeTalk;
bt.target = "bridge";
var myScript = ("var ftn = " + psRemote.toSource() + "; ftn("+file.toSource()+");");
bt.body = myScript;
bt.onResult = function( inBT ) {myReturnValue(inBT.body); }
bt.send(10);
function myReturnValue(str){
res = str;
dim = str.split(',');
function psRemote(file){
var t= new Thumbnail(file);
return t.core.quickMetadata.width+','+t.core.quickMetadata.height;
}catch(e){unloadXMPLibrary();}
var res = true;
if(dim[0]<1001&&dim[1]<1001) res = false;
return res;
function loadXMPLibrary(){
if ( !ExternalObject.AdobeXMPScript ){
try{
ExternalObject.AdobeXMPScript = new ExternalObject
('lib:AdobeXMPScript');
}catch (e){
alert( ErrStrs.XMPLIB );
return false;
return true;
function unloadXMPLibrary(){
if( ExternalObject.AdobeXMPScript ) {
try{
ExternalObject.AdobeXMPScript.unload();
ExternalObject.AdobeXMPScript = undefined;
}catch (e){
alert( ErrStrs.XMPLIB );
- Read related articles
- Can I resize photos and reduce JPEG file sizes by using Photpshop Elements?
- IOS 7: Cannot zoom out or resize photo (large) for lock screen. Please Help?
- Batch resizing of photos in either Bridge of PS?
- How do I resize large batches of photos to 640x480 and 97KB?
- How do I batch resize 5,000 photos via PS CS4 Extended?
- Batch Resizing Based On File Size
- Memory consumption issues (when doing large batches of photos)
- I have Adobe Photoshop 9. I am a novice. How can I resize photos in my files using batch resize?
- How to i resize a larger 72ppi image to better quality smaller image but for correct size to paste into flyer
- I'm trying to make "Stop motion videos" in Final Cut EXPRESS by using 100's of still photos and setting them to music. They are coming out blurry if viewed larger than 4x6 in size
- When ordering large batch of photos - "transferring" seemed slow. I hit cancel. Did I lose my order? When I try to "buy photos" again it says "connecting" but doesn't seem to connect...
- Can I change an Extra Large photo book to a smaller size once done?
- Batch Resizing within Aperture?
- Making small photos larger to be used in slide show
- Batch Emailing Photos in iPhoto '08
- Iweb photo page resizes photos
- Making sure photos are the exact same size
- Smart Batch Resizing? vertical/horizontal
- Does photoshop elements enable save for web for a batch of photos?
-
Can I resize photos and reduce JPEG file sizes by using Photpshop Elements?
-0001-11-30Can I resize photos and reduce JPEG file sizes by using Photpshop Elements?Go to Image>Resize>image size. For purpose of web posting, go to File>save for web.Read other 3 answers
-
IOS 7: Cannot zoom out or resize photo (large) for lock screen. Please Help?
-0001-11-30I cannot zoom out or resize a picture because if it being a large picture, I don't want the picture being blocked by the time or date. Anybody help with this issue. With iOS 6 it was fine.It's a glitch. No idea when Apple will release a fix (or if th
-
Batch resizing of photos in either Bridge of PS?
-0001-11-30Hi, I am wondering if anyone can advise or assit me? I have a number of photogrpahs (188) that I need to batch resize (reduce by 50%), is there a way I can do this en mass, either in Bridge or PS so i dont have to open each one indivdually? thanks fo
-
How do I resize large batches of photos to 640x480 and 97KB?
-0001-11-30Greetings, All, I need to learn how to resize large batches of photos in my iPhoto library, and limit them to 640x480, and a file size of just 97KB. Can't seem to figure out how to do it in iPhoto, and am thinking about giving Aperture a try, thoug
-
How do I batch resize 5,000 photos via PS CS4 Extended?
-0001-11-30I have 5,000 photos that I took with my Go Pro camera in hopes to make a timelapse movie in Premiere. These photos come out of the camera roughly 1900x1200, and I'm interested in resizing all of them. I know that there are ways to do batch resizing,
-
Batch Resizing Based On File Size
-0001-11-30I have a lot of very large (400-600Mb) tiff files (from a scanner) that all have different ratios (some square, some 4:3, some extreme panoramic). Is there a way I can batch resize them all to a certain file size? (eg 200Mb) I've been looking everywh
-
Memory consumption issues (when doing large batches of photos)
-0001-11-30I have a user who reports my plugin consumes memory until Lr/System is no longer operable, when doing large batches of photos. I have this type of problem too from time to time, but not always, and in the most recent case, *not* for the same operatio
-
I have Adobe Photoshop 9. I am a novice. How can I resize photos in my files using batch resize?
2015-10-11I have Adobe Photoshop 9. I am a novice. How can I resize photos in my files using batch resize?In the Editor, use File...Process Multiple Files. See the Help for more info. KenRead other 2 answers
-
How to i resize a larger 72ppi image to better quality smaller image but for correct size to paste into flyer
-0001-11-30Hi, I am trying to resize a larger 16cm wide image saved at 72dpi to a smaller better quality 5cm wide image for invites for an art exhibition I am having. I figure there must be lots of information in the pic given that it is large, I just want to c
-
I'm trying to make "Stop motion videos" in Final Cut EXPRESS by using 100's of still photos and setting them to music. They are coming out blurry if viewed larger than 4x6 in size
-0001-11-30I'm trying to make "Stop motion videos" in Final Cut EXPRESS by using 100's of still photos and setting them to music. They are coming out blurry if viewed larger than 4x6 in size. I don't understand why this is happening. Quick follow up, sin
-
When ordering large batch of photos - "transferring" seemed slow. I hit cancel. Did I lose my order? When I try to "buy photos" again it says "connecting" but doesn't seem to connect...
-0001-11-30When I tried to order large batch of photos in iPhoto - it seemed to get stuck halfway through. I hit "cancel". When I tried to "buy" photos again... it never seemed to connect. Did I lose my order? Is it half-uploaded somewhere and I
-
Can I change an Extra Large photo book to a smaller size once done?
-0001-11-30Can I change an Extra Large photo book to a smaller size once done?Sure - butyour text boxes may need work since being a different size may affect the view - to change duplicate the book just in case (select it and press command - D) and then go to t
-
Batch Resizing within Aperture?
2015-12-10Greetings- I shoot 400-600 images a day, thus I'm beginning to run out of hard drive space. I don't want to create a new vault of pictures on an external drive. I'm willing to reduce the overall size of my photos in order to create some space on my
-
Making small photos larger to be used in slide show
2015-10-11I am using Photoshop elements 10 with windows 7 on my Toshiba laptop. I am trying to make a slide show of photos for my brother's funeral. The photos will be shown on a screen at the church and on a TV monitor at home. I was used to Photoshop 4, but
-
Batch Emailing Photos in iPhoto '08
2015-10-11Hello Emailing a photo or two is cake, as long as having the photo inline in the email is ok. If I wanted to send a batch of photos, say 30 and wanted them 'packaged' in a folder instead of inline in the message, what would be the simplest way of doi
-
Iweb photo page resizes photos
-0001-11-30It seems no matter what I do I cannot get an iweb photo page to NOT resize my photos. On a photo page I have gone to the inspector and selected none and original for the photo download size and iweb still resizes the photos when I publish to a folder
-
Making sure photos are the exact same size
-0001-11-30I am creating before and after photos and need to make sure that each are the same size. I will have groups of 2 side by side and then groups of 6 with 2 across and 3 down. Once I create them in layers, is there a way that I can check to make sure
-
Smart Batch Resizing? vertical/horizontal
-0001-11-30Hey, I have a question of how you would batch resize a ton of photos to 50 % of its original size. The workflow I've had before is going trough image processor and doing the resizing when I'm converting to .jpeg. The only problem with image processor
-
Does photoshop elements enable save for web for a batch of photos?
-0001-11-30does photoshop elements enable save for web or ready for web for a batch of photos ?Hi Patonabike, You can batch save images as jpeg, png, tiff etc. using Process Multiple Files. This feature will even allow you to batch resize them (as long as they

Hots 
- 1Is anybody else still not able to use the App Store? I can't download nor update any apps. I have an IPhone 5 device not currently updated to iOS 7 as my partner also has an iPhone 5 running iOS 7 and it seems to have some issues at the moment. 10-11
- 2Released transport not present in QA Worklist 11-30
- 3Using ACS for VLAN assignment 11-30
- 4The application system preferences can't be opened 11-30
- 5Reference Module in F n' R 11-30
- 6CTRL+P requires manual tab focus when printing a PDF within FF4. This worked fine in FF3. Why does it not work any more? Thanks! 11-30
- 7Invalid product code 11-30
- 8Eeepc 901 fan not working 11-30
- 9No puedo hacer correr itunes, baje la ultima version y me aparece r6034 11-30

News 
- ITunes 9.0.1 Deleted My iTunes Library10/11
- CALL WEBI Report from SAP Portal10/11
- When i sync my iphone with my computer IT WANTS TO DELETE MY APPS.10/11
- How Do i Change the itunes file from ACC to MP3 ?10/11
- Inspection Processing11/30
- In production order for a particular mat.11/30
- Album import question11/30
- Apex on linux - when and how to install http server11/30
- Oracle University Study Guide11/30
- Remove MC when leaving the frame11/30