Skip to main content
Known Participant
September 18, 2019
Open for Voting

P: Allow JPEGs to be embedded, to save disk space

  • September 18, 2019
  • 54 replies
  • 4196 views

Problem:
Let's say my client sends me a 4Mb JPEG file which needs retouching for a project. I open it in Photoshop, add a couple of simple adjustment layers, and save the image as a psd. The resulting file is now 65Mb. This waste of disk space is totally unnecessary, since all I've added to the image is a couple of adjustment layers. And if I'm working on, say, a magazine containing hundreds of photos, the amount of wasted space really stacks up.

Solution:
Whenever you open a JPEG in Photoshop, it appears as an 'embedded JPEG layer'. This operates a lot like a Smart Layer. You can apply effects to it, but the layer itself is not regarded as editable bitmap data (unless you rasterize it). Then, when you save it, the original JPEG remains embedded in its original JPEG format, so if you haven't added any raster layers, the file size should be only slightly larger than the original JPEG.

54 replies

Known Participant
September 20, 2019
Linked objects have their own set of issues, like causing havoc with deliveries when you or a vendor forgets to send those linked files... and in the case of a jpeg or 2, you are not saving any total file size if you are embedding the jpeg directly by placing it as an embedded object. The data has to live somewhere, it's just whether the original is zipped up in the psd or linked from outside... there's still only one copy.
Using linked smart objects is a little cumbersome. First you have to first measure the size of the JPEG, then create a new document the same size, then finally "Place" the JPEG into the document...
That I can help with! Here's a three step workflow to get you there...
1. Create new document preset with 100x100px (+ any other settings you usually have), now you can use that over and over.
2. Place your jpeg directly as an embedded smart object (see optional step 2a for faster way to do this)
  2a . Optionally, change options->General->"Always create smart objects when placing..." so you can just drag-n-drop from your file system onto the canvas.
3. Image->Reveal All
Lee JamesAuthor
Known Participant
September 20, 2019
TIFF file format has a JPEG compression mode. Not sure if that's of any benefit, but you can try it.
Thanks, but that isn't helpful. This would re-compress the images and make them lossy.
Lee JamesAuthor
Known Participant
September 20, 2019
TIFF file format has a JPEG compression mode. Not sure if that's of any benefit, but you can try it.
Thanks, but that isn't helpful. This would re-compress the image, and create lossy images.
Lee JamesAuthor
Known Participant
September 20, 2019
this is why we have linked smart objects
Using linked smart objects is a little cumbersome. First you have to first measure the size of the JPEG, then create a new document the same size, then finally "Place" the JPEG into the document as a linked smart object.

I've just tried doing this and it makes no difference to the final file size. It's obviously still being turned into raster data.

But the idea of using linked smart objects is probably the way to go. All Adobe needs to do is:
  1. Make all JPEGs open as linked Smart Objects by default, rather than having to create a "container" document and "Paste" them in.
  2. Don't save copies of the JPEGs inside the document!
  3. Preview files should be of limited resolution, JPEG compressed
Known Participant
September 20, 2019
@17139596 mechanically, there are three different ways (well 4, but with CC libs) to embed an image that originates from a JPEG. Bear with me, I'm not trying to be condescending here...

1. You add the jpeg image as a new layer that is not a smart layer... it's just pixels, then you convert that layer to an embedded smart object
2. You "place" the jpeg directly as a smart object layer either through drag-n-drop (if you have that setting enabled, or through "File->Place Embedded..."
3. You place a jpeg as a linked object then convert to embedded.

In case #1, your smart object is a new .psb file embedded in the document.
In case #2/3, it literally copies the jpeg file and saves it into the document like a secret zip file. If you open the smart object, the title of the new tab has a name like "whateverthing.jpg"

Same if you embed a bitmap or a png directly. So from a purely technical semantic point of view, Photoshop already does exactly what you originally asked for... it's just that it wasn't necessarily the root of the problem you are trying to solve.

Here's a test for you... in your doc, select a smart object layer and do "Layer->Smart Objects-> Export Contents..." and save out the contents. Then you can check the file size of that to see how much room it's taking in your psd. Also whether it's a jpg or psb file.
Todd Shaner
Legend
September 20, 2019
TIFF file format has a JPEG compression mode. Not sure if that's of any benefit, but you can try it.

Inspiring
September 20, 2019
Re-read my post. I don't use Lightroom, I am using Elements together with its organizer and ACR for my own needs. Contrary to 'pro' users, I don't only work on millions of shots like events and sports reporters. I don't only work on retouching jobs implying hundreds of layers and a multitude of detailed retouches. It's everything when I need to. For those pros, it's easy to tell which tool, parametric or pixel editor is the best. Pixel editors are needed for both photographes and digital painters. Digital painters also need vector tools like Illustrator.
This forum is full of people wanting a single app to be at the same time a pixel, a parametric and a vector editor. All that 'smartly integrated'. And of course, smarly integrated with FB, Google and all social media on the 'cloud'!

I don't believe in 'smart' integration. Better is possible but difficult, especially when the dedicated tools have been developped separately, which is the case with Adobe. The result is a package which requires good understanding from the users and a huge learning effort. Then, the best workflow and choice of tools will be more obvious depending on your type of job.  And I am glad you found my advice about parametric edinting a possible solution to the big waste in diskspace in your original example.

Difficult to advise a given workflow to avoid such waste if you don't know if you are mostlly a retoucher or a wedding photog, if you need very detailed saving of your job for a limited time or forever. In my case, edits needing hours are the exception. Such edits don't need to be kept more than one year, except for a few tutorials. It seems that other champions have understood your challenge as optimizing the size of multilayered files with a lot of 'smart objects'. That's another topic, and my question is: if it's so important to keep the information about each editing detail from all the external sources in a pixel workflow, why bother about disk space? Will all those details be useful in a few years?
September 20, 2019
To the best of my knowledge when you open a jpeg in Photoshop it does not retain the compression in any way.  If you resave the image as a jpeg it recreates the compression and it will be different than the previous jpeg and will generally result in more information being lost in the compression. 
Lee JamesAuthor
Known Participant
September 20, 2019
Right, the online aspect is what I was thinking of too. Sharing files and backing up. There are currently huge efforts being made to improve compression for online files (video compression etc) in order to minimize data. As an efficient person, I always like things to be as optimized as possible to save file space.
Lee JamesAuthor
Known Participant
September 20, 2019
Mr Lehman,

The title of this idea is: "Allow JPEGs to be embedded, to save disk space". It has nothing to do with speed. I suppose everyone's different but I don't mind my files opening and closing a little slower if it means the files are many times smaller.

I do have a gripe that newer versions of Photoshop take many times longer to launch than older versions, but it's unrelated to this issue.