Photoshop tip: Create reusable modular mockups fast with Generate Image Assets & Linked Files

The backstory

I was working on a client brief, which required creating a modular page that would be updated in different time phases, with most of the content reusable throughout. As per our usual workflow, we were to submit all page mockups in JPGs for approvals before creating the HTML pages.

Being familiar with prototyping tools like Adobe XD and Sketch, I was aware that the Symbols feature would be a perfect solution. Having said that, there were two considerations before I came to my decision to use Photoshop instead:

Seamless handover of working file to the client.
By “working file”, we always meant PSD or AI files which the client has been using.

2 hours of lead time.
Once the visual assets and style guides were provided to us, we had to get the page mockups completed within 2 hours. As time wasn’t on our side, getting a new software and onboarding our client was not feasible.

Therefore, Photoshop was the best choice and I thought of this workaround to get past its limitations. Hopefully, this will be useful to anyone who works only with Photoshop and needs to create reusable and modular page mockups in short turnaround time.


Pre-requisites

This tutorial will be beneficial to designers/developers who have knowledge of Photoshop’s Artboards and Generate Image Assets functions.

For a more comprehensive guide, read Generate Image Assets Functional Spec on GitHub.

*Due to NDA, the following tutorial is constructed based on a mock brief from Briefbox.


Create an artboard for each content panel

Step 1

In Photoshop, create an artboard for each content panel, and name them in this format – {subfolder}/{assetname}.jpg.

In my working file, I named them panels/_____.jpg.

Image optimization tip: Appending a percentage (e.g. “70%”) at the end of each filename will output the image asset at this quality. (More details in the guide on GitHub link above.)

Step 2

Save the PSD file.

Highly recommended: Save it in a filename and location that will not be changed later – explained at the end of the tutorial.

Step 3

From the menu, go to File > Generate > select Image Assets.

This will automatically generate the artboards named in Step 1 into a folder, with -assets suffix, in the same location as your PSD file.

For example, if I saved my PSD file as page.psd on my Desktop, the image assets will be output to Desktop > page-assets folder.

Since I named my artboards panels/_____.jpg in Step 1, I will find the output files one level deeper under the corresponding subfolder, page-assets > panels.

Generate Image Assets from the menu

Assemble the content panels into page mockups

Step 4

Create a new artboard for each mockup page in the same PSD file, and name them in a similar format as Step 1.

This time, I want my mockups to be output to a different subfolder, so I named these artboards mockups/_____.jpg.

Modular page mockups

Step 5

From the menu, go to File > Place Linked… > select the image file output from Step 3 (e.g. panels/_____.jpg).

Repeat for each panel as you assemble the page mockups.

Placed Linked from the menu

Voila!

Assuming the Generate Image Assets option has always been turned on, the page mockups are already output to page-assets > mockups subfolder.

Folder structure of the PSD and its image output files

Here’s how my workspace of all the artboards in Photoshop looks like:

Workspace in Photoshop

What happens if you make changes to layers, filename or location?

If there are changes to the panels, you will see an exclamation mark indicated on each layer. Simply right-click on them and select Update Modified Content (or Update All Modified Content to update all layers at once). You should see your page mockup(s) updated to the latest.

If you changed the filename of your PSD file (e.g. page.psd to page2.psd), Photoshop will generate the assets to a new folder (page2-assets) based on the new filename. The linked files, however, will still be pointing to the old output files. You will need to right-click on each panel, click on Replace Contents…, and select the newly generated asset under page2-assets folder.

If you moved the PSD file to another location, similarly, you will need to do a Replace Contents to update the linked files of each panel.

Unfortunately, replacing contents it’s a very manual process because Photoshop doesn’t allow you to do this for multiple layers at once. Therefore, it’s highly recommended to stay with the same filename and location if possible.

Working with a huge PSD file

As the number of artboards and smart objects increases, so do the PSD file size and the RAM needed to generate the assets. In this case, it would make sense to maintain the content panels and page mockups in two separate PSD files.

For my actual brief, I was working off a 1.6GB PSD file on a MacBook Pro with 32GB RAM. It took 2-3 secs for all artboards to be output every time there were changes. If the automatic output is disruptive, you can disable Generate Image Assets first, and re-enable it once you are ready to update the mockups.


There are no hard and fast rules here. As long as your PSDs, artboards and image outputs remain organized, you will be able to do more in less.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.