PIM-3535: Added a path resolver for media setter

| Q                    | A
| -------------------- | ---
| Bug fix?             | No
| New feature?         | No
| BC breaks?           | No
| CI currently passes? | Yes
| Tests pass?          | Yes
| Scenarios pass?      | Running
| Checkstyle issues?*  | No
| PMD issues?**        | No
| Changelog updated?   | No
| Fixed tickets        | -
| DB schema updated?   | No
| Migration script?    | No
| Doc PR               | No
resolve the file path of a media or an image