Photoshop actions no longer safe? I just resize and save the jpg.
Copy link to clipboard
Copied
I'm using version 26.4 and suddenly I found a scary bug .
I opened abc.jpg and recorded an action: img (change 350dpi, 190mm width, press Ctrl+S again, save as abc.jpg, then close)
Next I perform the img action on 123.jpg and I realize that I get a picture named abc.jpg but the contents are from 123.jpg.
It's so scary, do I have to save as, instead of just tiles.
The problem used to be that recorded actions would always be saved to the directory where the action was originally recorded (e.g. D:\a\abc.jpg), and would not be updated to the directory of the current picture (not to D:\b\123.jpg).
This problem has not been solved yet, but today I saw another big bug.
My god, what a sin, scared the baby to death.
Explore related tutorials & articles
Copy link to clipboard
Copied
Please provide meaningful information, starting with a screenshot of the fully expanded Action in the Actions Panel.
Copy link to clipboard
Copied
When you record the action, DO NOT make changes to the folder or filename. if you do, those will be hardcoded into the action and used every time you run it. Which is how you got your file overwritten.
Copy link to clipboard
Copied
When you record the action, DO NOT make changes to the folder or filename. if you do, those will be hardcoded into the action and used every time you run it. Which is how you got your file overwritten.
By ExUSA
I suspect the original poster misunderstood what they actually recorded in the Action, that’s why I asked for the screenshot of the fully expanded Action.
Copy link to clipboard
Copied
Keep in mind that an action does exactly what is recorded. Always go over the steps, and always test.
And yes, @ExUSA is right. Make sure the file name and save path is not highlighted in blue when you record the action. You cannot use Save As, you have to use a plain Save, and you cannot change anything.
All that said, I would never, ever, ever, have an action that overwites the original. That's just too dangerous...
I have a lot of actions that save to different formats, and they all end with "close, no save" so that the original is always sent right back to where it came from unchanged. Effectively, you're saving out a copy. There are different ways to set the destination without risk to the original.
Copy link to clipboard
Copied
Actions have always recorded an absolute path from the recording system, and optionally a filename as well:
If running the action in interactive "modal" mode on a single open image, you can change the filename and location.
If running the action via the automate > batch command, then there's a checkbox to "override action save options" so that the recorded path and or name aren't used (otherwise the batch would overwrite itself).
Copy link to clipboard
Copied
There should be no problems with the operation process.
It turns out that there is a problem that has not really been solved, I recorded the action is saved as a jpg and then closed, but in the process of executing the action, encounter PSD, Tif will pop up the window, which is understandable.
But the original image is in png format, and the save as jpg process pops up the window, which is a bit annoying.
Copy link to clipboard
Copied
Please illustrate the whole process, your description seems a bit unclear to me.
What are the other steps in the Action?
Copy link to clipboard
Copied
But the original image is in png format, and the save as jpg process pops up the window, which is a bit annoying.
By dublove
There can be lots of explanations for that, like 16 bit depth - not allowed in jpeg.
Generally, you always need to consider what properties are allowed in what file formats. There really isn't much you can do in Photoshop before PSD or TIFF are the only possible file formats.
I still believe this is at the root of your whole problem.
Copy link to clipboard
Copied
png also allows for transparency which is impossible in jpg.
Copy link to clipboard
Copied
Yeah, even more likely.
Copy link to clipboard
Copied
Actually, we have to make a distinction between "Save As" and "Save", and this is one of those things you need to consider when recording the action.
A Stephen says, "Save As" will always record the absolute path. It has to. There is no Save As without telling it where to save.
But a simple "Save" will not record anything beyond the save operation itself. It will overwite the file and save it back to wherever it happens to be. No path is recorded, no name is recorded. So both stay the same (I just tested this to be sure).
I suspect what happened to the OP is that he recorded a "Save" action on a jpeg, but with added layers or 16 bit depth. Then, of course, it can't be saved as jpeg - which forces the Save As function instead. If you complete that, you have an action with a specified save path.
Disregarding the bad practice of resaving jpegs for the moment, the way around this is to include steps in the action that makes the file comply with the jpeg specification. Then a simple Save will be available and working as expected.

