August 9, 2023

Code Replacement in Photo Mechanic

Sports photographers get their photos to news desks quickly and with accurate captions. Photo Mechanic Code Replacement is the magic bullet

This week, I asked a photographer colleague, Chris McCluskie, to write a guest blog as I usually run my Switch to Manual Workshops on Saturdays and Sundays. Last weekend was the first games in the Scottish Premiership took place. You will have seen photos from the matches in all the Sunday papers the previous day. As well as taking great photographs, a sports photographer must tell the picture desk who is in the pictures and what they are doing. As you can imagine, many photos are taken in 90 minutes, so a football photographer has to be fast and accurate in adding captions, even while the game is happening. Most photographers use the Code Replacement tool in Photo Mechanic to add captions. I’ll hand it over to Chris for him to explain how it all happens.


This post is about PhotoMechanic and what makes it the industry standard application for sports photographers. For me, whilst covering a sporting event, nothing is quicker than PhotoMechanic for processing, editing, captioning and sending out images to media outlets. Getting your images sent out as fast as possible is critical to selling your images. The sooner they can land on a picture editor’s desk, the more chance you have of your images being used.

Here’s a little of the process I go through to prepare PhotoMechanic before a football match and how I use it whilst pitch side during the game. As a working example, I’ll use my set-up for the Scottish Cup final in June.

To start with, there’s a bit of groundwork that I do before I get to a match. This prep work makes the PhotoMechanic process work smoothly – but I’ll get to that momentarily.

So, you may or may not know, but every image sent to media outlets must have specific information embedded within it. All photo agencies, such as Getty and Reuters, as well as the agency I output my images through, SportPix, supply templates to their photographers. These templates fill in most information needed to meet the International Press Telecommunications Council (IPTC) requirements. The IPTC (or Metadata) includes all the sporting event information, such as the match, the teams, the date and the location. It also includes contact and payment details so that any media outlet knows whom to pay for usage. This is all automatically embedded into the images by PhotoMechanic whilst they are imported from my memory cards.

As I said, I use an agency template for all the standard data. For the unique descriptive details to caption an image, there’s another part of the PhotoMechanic process, called ‘code replacement’, that I use – and, for me, it’s this part that makes PhotoMechanic essential whilst pitch side.

Code replacement is a way of quickly and efficiently inputting all the player’s names and other pieces of descriptive text required to caption an image. When the pressure is on to get images processed and sent out, using code replacement is a must.

Preparation Work before the game

Other than the information within the agency template, there are three IPTC information fields that require me to input text manually in PhotoMechanic: the Caption, Keywords and Persons Shown fields. To make the code replacement work, I must first set up separate text files, which I then link to PhotoMechanic. This is all done before I leave for the match.

I do one text file for each team and one for the referee and his assistants. In my text files, each player is listed with his team’s name and other relevant information to the individual (nationality, on-loan, striker, defender etc.). I also include managers, coaching staff and club directors.

Importing Code Replacement Text Files

Once the text files have been created and saved, they must be imported into PhotoMechanic so that the application knows what key combination activates which players’ information.

My files are saved into a folder for whatever match or sporting event I cover. Then through the Settings menu in PhotoMechanic, I choose the Set Code Replacement option and select my files.

How Code Replacement Works

Each person is given a unique code. What makes code replacement so good in PhotoMechanic is that I type in the code instead of typing names and information, and all the person’s details appear instantly. Whilst under pressure, trying to correctly spell some foreign names or list lots of players involved in an image is difficult and time-consuming, so setting this up beforehand is a must.

For example, instead of typing “Ange Postecoglou, Manager of Celtic,” I’d only need to type his code which is \cm\, and then his information will appear instantly. Or if the Celtic number 9 scored, instead of typing “Sead Haksabanovic of Celtic”, I’d simply key \c9\.

I also have a list of descriptive text for captions which is very helpful. For instance, instead of typing “shouts instructions to his defenders”, I would type \sid\ or “celebrates scoring his sides first goal of the match” would simply be \ce1\.

This all might seem tricky, but once you’ve done it a few times, it becomes second nature and is such a time saver. I also have the descriptive codes taped to my laptop to remind me!

During the match

I constantly import images into PhotoMechanic from my memory cards when the game is underway. PhotoMechanic can import very, very quickly and can do so from more than one card at a time.

I can then input the captions and crop and straighten images before sending them out while keeping an eye on the match!

Sending out images whilst pitch side – if you can get a network – is also done in PhotoMechanic and done through FTP. The images are automatically numbered sequentially and sent to multiple media outlets simultaneously.

PhotoMechanic also automatically reduces the file size to under 2Mb and can limit the dimensions of an image to 1600 pixels wide, as newspapers do not require huge files.

So that’s it. That’s the process and why PhotoMechanic is such an integral part of getting images sent out accurately and quickly. Each photographer has their way of doing things within the application, but this is my process, and it works for me.

Please give us your feedback.

If you’ve got any questions or comments, leave them below. You can sign up for the Edinburgh Photography Workshop monthly newsletter, where you’ll get regular updates on exciting things happening in photography and some great tips. Sign up by clicking here.

About Chris McCluskie

Chris has been a sports photographer for over ten years. He has covered all levels of football, from youth games to English Premiership, Champions League finals and international matches. As well as football, he has covered international rugby, golf, cricket and world athletics meetings.

You can see some of Chris’s work at his website (, or you can follow him on social media on Instagram (100iso_photos), Facebook (100isosports) and Twitter (@100iso_photos)