• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Can I change the linked image using expressions?

New Here ,
Mar 26, 2023 Mar 26, 2023

Copy link to clipboard

Copied

Is there a way to set a layer's image to an image located in a specific folder using expressions?

 

I'm hoping to create a template wherein I can use a spreadsheet to automatically update dozens of images, rather than Ctrl-H for each one in the comp.

TOPICS
Expressions

Views

473

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 26, 2023 Mar 26, 2023

Copy link to clipboard

Copied

I don't know of any way to change a layer's source with an expression. I think the closest you could come would be to have all the images set up as layers in your comp with opacity expressions to turn off all of them except the one selected in your data file. You could do it with a script though, that you run whenever you change your file, but that's a bit of work to set up...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 26, 2023 Mar 26, 2023

Copy link to clipboard

Copied

Thanks for the response. I figured it was a long shot. 

I'll be adding photos in the future. I don't have them to make layers at the moment. 

My next best idea is to make a placeholder folder, put the new photos in a different folder with the same filenames, then delete the original photo to break the links, and point to the new folder for only the first one. It's the only way I can think to save a ton of Ctrl-H work.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 26, 2023 Mar 26, 2023

Copy link to clipboard

Copied

LATEST

It would be a fairly straightforward scripting project, where you have a template project set up with placeholder media, you launch the script which prompts you to navigate to your text/xml/json/csv file that contains file paths to replacement media, the script imports the new files and replaces the layers' sources with the new files. Nothing fancy, but a bit of work, expecially if you haven't done any scripting before. It would be a good (but challenging) first script though...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines