# Can I batch export images all to specific file size?



## production (Jun 7, 2019)

I want to be able to export images and guarantee they will end up a specific file size. I know you can 'limit file size to'  but if you limit to 15mb they can come out anywhere between 5 and 15 or even lower. It seems like it doesn't even really depend on the original file size. Or at least guarantee they will be within a few mb of each other. Any ideas?

Thanks so much


----------



## clee01l (Jun 7, 2019)

JPEGs are lossy compressed files.   Some compress more compactly than others.   Lots of blue sky in an image will compress to a smaller file than say an image that has lots of variation (like leaves).   This is the nature of the JPEG compression algorithms.   You can not get around this restriction for JPEGs.    Limiting the output size of a JPEG image only varies the level of compression (there are 12 levels) to find the minimum one that meets your is size restrictions.

If you want consistency, crop your images to the same number of Pixels. then choose a byte limit that meets your restrictions.  Let LR choose the minimum compression level to meet your size limits.  Some (like the one with lots of blue sky will be smaller than the others but all will result in the same number of pixels the decompressed  by the viewing app.


----------



## Johan Elzenga (Jun 7, 2019)

production said:


> I want to be able to export images and guarantee they will end up a specific file size. I know you can 'limit file size to'  but if you limit to 15mb they can come out anywhere between 5 and 15 or even lower. It seems like it doesn't even really depend on the original file size. Or at least guarantee they will be within a few mb of each other. Any ideas?


Why is file size so important to you?


----------



## Dan Marchant (Jun 9, 2019)

production said:


> I want to be able to export images and guarantee they will end up a specific file size.


As explained above, different images compress differently and thus end up at a different file size. If your least compressible image ends up at 5MB then the more compressible ones will all be smaller. I don't know of any way to force them to be all the same size but if you could all you would be doing is wasting disk space by making the more compressible ones larger than they need to be. 

I can think of reasons why you might need a specific pixel size. I can also think of reasons why you might want a maximum files size. Can't think of a reason why you would be uniform file size. Could you explain why exactly you need this? Maybe we can think of some alternative to achieve you aims.


----------

