Convert image type and save to relative folder with automator

I found a question and working answer here How to create an Automator service to convert images from one file type into another file type using the right-click contextual menu? but it is saving the output file to desktop only. I can understand that this can be saved to relative path(like if source file is in directory /Desktop/Resources/myImage the output file in path /Desktop/Resources/myImage/Converted) with some actions in automator like set value for viable etc. But I am not familiar with that. How to use the set value for variable and get value for variable.


Solution 1:

You don't need to play with variables. When I configure the service as below, it makes a copy of the files (?!) when I use the New Folder action. Then it is a matter of converting the files in the new folder.

enter image description here