Photoshop: Layer (Comp) Export to JPG very bad quality and file size

  • 4
  • Problem
  • Updated 5 months ago
  • (Edited)
This bug is very annoying since a long time:

When i automatically export JPGS by Scripting -> Layers to file or -> Layercomps to file, the JPGS files are way to big and the show very heavy compressing artefacts, meaning they good a really bad quality.
When using the PNG Option, the quality is very nice, but the files are very big too. Of course, its an png.

I need to export to jpgs, why is it not possible with acceptable quality and filesize?
Manual export file to web works fine, but thats not an option with a lot of Layer Comps.

Please fix this.

PHOTOSHOP CC 2014.2 OSX YOSEMITE.
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 18 Reply Likes
  • frustrated

Posted 4 years ago

  • 4
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14049 Posts
  • 1735 Reply Likes
If you set the JPEG value to 12 is it better?
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 18 Reply Likes
Yes, quality with 12 is better. But the file size is way too big.

For example, a simple website design 1.150 x 6600px:

Scripting-> Layer to File -> JPG Value 12 -> 7.0 MB / Perfect Quality
Scripting-> Layer to File -> JPG Value 8 -> 4.4 MB / Bad Quality!!

With Manual Export 100% JPG -> 3.5 MB / Perfect Quality
With Manual Export 80% JPG -> 1.4 MB / Very good Quality

There must be a complete different and ineffective or buggy procedure or engine for the automatic and scripted jpg exporting methods.

ADOBE, PLEASE FIX THIS BUG!
Photo of christoph pfaffenbichler

christoph pfaffenbichler, Champion

  • 1208 Posts
  • 166 Reply Likes
So far you have not made a convincing case and I can’t reproduce the issue.
Please post the images.

Part of the difference may be embedded profiles and metadata.

edited
Also what are your exact and complete settings in either case?
Photo of Emily Brennan

Emily Brennan

  • 2 Posts
  • 1 Reply Like
This is happening for me too - can't find any fix yet
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 18 Reply Likes
did you compare these 2 ways and had a good output per scripting?

setting above.
Photo of christoph pfaffenbichler

christoph pfaffenbichler, Champion

  • 1208 Posts
  • 166 Reply Likes
I did and could not discern a difference in compression quality.
And the settings you mentioned so far are not complete.

Please post a pair of corresponding jpgs.
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 18 Reply Likes
what about the size? even with both 100% (12), there ist a difference in about 100% file size. pictures posting later.
Photo of christoph pfaffenbichler

christoph pfaffenbichler, Champion

  • 1208 Posts
  • 166 Reply Likes
But you have not actually told what you mean exactly by »With Manual Export 100% JPG« – did you use Save As or Save For Web?
In the latter case you might have converted to sRGB, not embedded the profile, removed the metadata (even downsampled, though that seems unlikely).
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 18 Reply Likes
save for web
Photo of christoph pfaffenbichler

christoph pfaffenbichler, Champion

  • 1208 Posts
  • 166 Reply Likes
With which settings?
When will you post the images?
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 18 Reply Likes
later, sorry, gotta work right now. with photoshop :)
Photo of christoph pfaffenbichler

christoph pfaffenbichler, Champion

  • 1208 Posts
  • 166 Reply Likes
No problem, best of luck.
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14046 Posts
  • 1735 Reply Likes
Save for Web excludes metadata, an embedded preview and profile by default, so yes, the files will be smaller using Save For Web.
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14049 Posts
  • 1735 Reply Likes
You can modify the Layer Comps to Files script to use Save For Web instead of Save:

https://forums.adobe.com/thread/572458
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 18 Reply Likes
Sorry, but this script didnt change anything.

Same bad image quality for way to big jpg file size... double size, double bad than save to web.

why does PS use a different engine for jpg export?

Example detail/snippet from a OnePager webdesign export:

Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 13914 Posts
  • 1649 Reply Likes
Because they serve different purposes. Save As is for producing JPEGs rich in meta-info, while Save For Web is designed for producing the smallest files possible at the expense of stripping meta-info.

Can you post your modified script?

Did you use the code from the link I provided to modify the Layer Comps to Files script?

Did you modify to the provided code to save at 80% quality?
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 18 Reply Likes
i downloaded the script from the last post. without modifying.
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 18 Reply Likes
http://ps-scripts.com/bb/viewtopic.ph...

i am really not into scripts. i just double clicked it and okd the security warning.
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 18 Reply Likes
if you got a better script or solution, you are very welcome :)
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14049 Posts
  • 1735 Reply Likes
Just to confirm, your results in the screen shot above:

The top number "LAYERCOMP TO JPEG (8) -> TOTAL SIZE 4.4MB" is a result of each image running the script from http://ps-scripts.com/bb/viewtopic.ph... with "8" in the JPEG quality field. And the bottom "SAVE TO WEB JPEG (80%) -> TOTAL SIZE 2MB" is a result of each image from doing File>Save For Web and setting the quality to 80%?

Can you post your PSD with the Layer Comps your exporting?
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 18 Reply Likes
no, the above is not the result of a script, its the result of the photoshopfunction file/scripting/....

above is per file/scripting/layercomps to file -> jpg 8 quality. big size jpg 4.4 MB
bottom is file/save for web -> jpg 80% quality. better quality 2 MB

i cant post this client psd. but i can post any other, because this behavior is totally independent from the psd. its happening with every layer comp in the last years!

you even dont need a layer comp. just choose file/scripting/layer to file. works bad the same.

the script you delivered, yes i doubleclicked it. but it didnt change the results. or do i have to use the script file in a different way?

or do you have another, working script?
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14049 Posts
  • 1735 Reply Likes
I think I really need a file from you that exhibits that great of difference.

If I export this Layer Comps sample file ( http://adobe.ly/1ye1La2 ) that Julieanne Kost created back when Layer comps were introduced I get the following results.



The selected files were saved from Save for Web at 80% quality. The unselected files were exported from Files>Scripts>Layer Comps to Files... with quality setting set at 8. The Layer Comps to Files method is actually creating smaller files for me.

Note: a quality setting of "8" on a scale of 1-12 is comparable to 66% on a scale of 1-100 (what Save For Web uses)
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 18 Reply Likes
Interesting. Same here.
So it depends on the file...

there is hope :)
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 13932 Posts
  • 1653 Reply Likes
I'm assuming there's a ton of metadata or other meta-info in your files. If I have a sample PSD file that exhibits the large difference in size to examine - I can probably provide a workflow solution.
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 18 Reply Likes
i will provide a file soon.

usually i work with big files with hundred and more layers with text, pics, illus and lots of embedded smart objects.

this is why i need the script export function, so i dont have to manually export every layer and layer comp.

thanks in advance, jeffrey!
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 13660 Posts
  • 1560 Reply Likes
Cool. Thanks.
Photo of Marko Krstic

Marko Krstic

  • 1 Post
  • 2 Reply Likes
Download script form this link:

http://markokrstic.com/photoshop-scri...

I edited Script so now use Save for web + I removed four digit prefix numbers.

Cheers
Marko
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 18 Reply Likes
Thank you very much, Marko. Finally this is the solution!

But I am wondering why you and not Adobe is fixing this issue.
Photo of Sjoerd Faerber

Sjoerd Faerber

  • 1 Post
  • 0 Reply Likes
These scripts did the trick for me!!!

Yes really searched for an hour but this site with scripts did it:

http://www.ps-bridge-scripts.talktalk...
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 18 Reply Likes
Since Photoshop CC 2015, the old bug is implemented again :(

When exporting manually as a jpg (Quality 80) i get e.g a file size of 400kb.

Same file/design exported by "export layer composition" as a jpg (Quality 8) results in a file size of 5.5MB!

And it comes with visible artifacts, meaning way worse quality. Same bad old export engine :(

Why is Adobe not fixing this bug for years?
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 18 Reply Likes
any idea someone? adobe?
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 18 Reply Likes
Hello Adobe, why is the export layer script (filetype jpg!) not using the same export routine as "export as jpg"?

Cant you fix this?
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 18 Reply Likes
Hi Adobe,

the problem seems still unsolved. If i use export layer comps as jpg a simple webdesign results in 7MB per Screen (quality 10, even with jpg artefacts). The same export layer comps as files with png results in perfect quality 1.5 MB files. 

Why dont you fix the export layer comp script routing, since its obviously broken for several years?
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14049 Posts
  • 1735 Reply Likes
Malte, I haven't been able to reproduce this issue. If you can provide a source PSD that exhibits the behavior I can look into it.
Photo of Jaroslav Bereza

Jaroslav Bereza

  • 763 Posts
  • 157 Reply Likes
@Malte Schümann send your sample files or shut up! (not screen of them but files themselfs via Dropbox in Zip archive for example)

Btw: can you send your History log settings? This setting (worst scenario for metadata size) could explain a lot: http://sklad.bereza.cz/00-jarda/00_screenshot/2016-10-16_013441.jpg :-D 
(Edited)
Photo of elena buldacova

elena buldacova

  • 1 Post
  • 0 Reply Likes
Здравствуйте, у меня такая же проблема! Когда экспорт слоев в файл,возникает ошибка. Изменить разрешение от 300 точек на дюйм до 72dpihow to make so that when you export the layer, the resolution remains 300 dpi ?
(Edited)
Photo of Carina Williams

Carina Williams

  • 3 Posts
  • 1 Reply Like
I ran into the same issue described above and was looking to file a bug report. This only happens after upgrading to Photoshop CC 2017. The previous versions all perform correct output file sizes. When I export layer comps to JPGs I am now getting JPGs that are 20MB for a 300x250, 72ppi file, which obviously is ridiculous. Also, changing the JPG quality in the dialog box from 1 to 12 doesn't make a difference size wise. Same results. Definitely a bug. Hope this is going to be addressed soon!
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 17 Reply Likes
If there is a solution, please let me know. I will sent files too, for now I am in holidays.
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 17 Reply Likes
I also had concerns because the files it happened too were always confident customer designs...
(Edited)
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 17 Reply Likes
Hey Jeff,

where should i send my big psd file link to?
Photo of Kaitlin Martin

Kaitlin Martin

  • 2 Posts
  • 0 Reply Likes
I am also having this issue. Layer comps to jpegs produces jpegs that are 5 MB or more- these are only 300x250 px web banners. 
Photo of Malte Schümann

Malte Schümann

  • 126 Posts
  • 17 Reply Likes
No one from Abobe cares about this issue or our feedback. Make it like the most people nowadays, switch to sketch for designing websites. you wont miss photoshop! i am done with this software.
Photo of designbooth limited

designbooth limited

  • 4 Posts
  • 0 Reply Likes
When we are making web PNGs for ecommerce stores all the images need to be the same pixel size and of course smallest file size possible and also transparent. We always make a multi-layered PSD file with smart objects scaled to similar size. These can then be made into transparent PNGs by using "Export as" with transparency and 8bit smaller size - saved one at a time, named one at a time- very time consuming. Or we use Export > layer to files - great! all automated! to folder at high speed but the PNGs are larger file size :(- a real shame because everyone must be doing this. Any ideas?
Photo of eartho

eartho

  • 730 Posts
  • 179 Reply Likes
have you tried using Generate Assets?
Photo of designbooth limited

designbooth limited

  • 4 Posts
  • 0 Reply Likes
Generate Assets is nice but it doesn't crop to canvas size - which everyone needs when trying to make many images same size
Photo of eartho

eartho

  • 730 Posts
  • 179 Reply Likes
Sure it does, you just have to learn how it works. If you want a canvas crop, put an empty mask on that layer.
Photo of designbooth limited

designbooth limited

  • 4 Posts
  • 0 Reply Likes

Oh that actually works! thanks