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

Faster way to replace images in Robohelp?

Community Beginner ,
Mar 25, 2019 Mar 25, 2019

Copy link to clipboard

Copied

Need to find a way to replace 300 images with one image.

What I mean by that is that there are 300 topics that all have the same image, but point to different paths.

When I update this image, I want it to update the image in all 300 topics, keep the same path, and not have to do it manually.

Is there a way that I can do this?

TOPICS
New UI

Views

575

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 25, 2019 Mar 25, 2019

Copy link to clipboard

Copied

You can fix it for the future by putting the image in a Snippet and the inserting that Snippet wherever you want it. When the image changes next time, change it in the snippet and that's it, job done.

Sorry but existing images will have to be manually removed from the topics. If you right click the old images in Project Manager and select Properties, you will see a list of the topics the image is used in. There is a pencil icon that will open the topics one by one for editing.


See www.grainge.org for free RoboHelp and Authoring information.

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

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
LEGEND ,
Mar 25, 2019 Mar 25, 2019

Copy link to clipboard

Copied

Does this mean you have 300 copies of the same image in 300 different places in the hard drive?

Are they all named identically? If so, you could likely perform a find and replace operation of the image file name.

But generally speaking, as long as only one copy of the image exists and all topics point to it, it should be as simple as just saving the new version to the same location and overwrite the older version. The only potential issue I could think of would be if there were some sizing attributes used on one or more instances of the image.

Cheers... Rick

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
LEGEND ,
Mar 25, 2019 Mar 25, 2019

Copy link to clipboard

Copied

Just to note, if you have an image in RoboHelp and it appears in 300 topics, but each topic is in a different folder, it could well be that you are looking at one folder and seeing the path as ../ImageName.JPG and a different topic shows the path as ../../SomeFolder/ImageName.JPG. And that would appear to be two completely different paths, but still both paths would point to the single image instance.

Perhaps a screen shot of a couple of these?

Cheers... Rick

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 Beginner ,
Mar 25, 2019 Mar 25, 2019

Copy link to clipboard

Copied

Thanks for the suggestions Peter & Rick.

I should explain in a little more detail what I meant.

I have 300 topics in different folder locations throughout the project. Each topic uses the same image lets call it " Global Header" for this example. Global Header is a fixed image that is used across all 300 topics. The way I have set up my project is that each topic has it's one folder and images folder associated with it.

Ex:

Topic detail.png

The reason I have done the project this way is because these topics all have lots of images with them. If  I were to put all of the images in one folder for 300 topics it would be very confusing. If I were to change the global header image, I would have to go to each folder where the image is stored and update it manually. So to clarify, my question was addressing the possibility of being able to update that global header images across multiple path locations. So in my case the image is stored in 300 different path locations because each folder points to a different path for the image. Peter's suggestion with snippets works if I were to put the image in one location and reference it through multiple topics, which might be the only solution.

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 25, 2019 Mar 25, 2019

Copy link to clipboard

Copied

I create folders for logical groups of topics and then have an images folder for images only used within that folder. That might be in one or more topics but it will not be very large numbers. For images that are used across the folders, such as yours, I would have a top level folder or use snippets to avoid the situation you are in now. That's generalising a bit but you get the idea.

Given you could face this issue again in the future, I recommend changing things to make it easy next time.


See www.grainge.org for free RoboHelp and Authoring information.

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

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
Adobe Employee ,
Mar 25, 2019 Mar 25, 2019

Copy link to clipboard

Copied

Do I understand right, that:

  • There is one image. Identical copies of this image are spread over many folders.
  • The copies of this image all have the same file name (e.g. "MyImage.png").
  • There are 300 topics that use copies of this image from different folders.

If that is correct, you should be able to easily fix this with a little bit of regex search and replace:

  1. Make a backup copy of the existing project (maybe even zip it just to go sure).
  2. Use any text editor that supports search & replace over multiple files (and subfolders) and regular expressions. A free and good one for this task is e.g. Notepad++
  3. Do a find/replace on all the htm files in your project.

Now, you could do multiple find/replace actions like these:

="folder1/MyImage.png" → ="images/MyImage.png"
="folder2/MyImage.png" → ="images/MyImage.png"
="folder3/MyImage.png" → ="images/MyImage.png"

Instead, you can use regular expressions for a "catch all". Like this:

="(.+?)/MyImage.png" → ="images/MyImage.png"

You can do this with any good text editor like Notepad++.

Here is how it works with Notepad++:

  1. Choose Search > Find in Files...
  2. Define a find string.
  3. Define a replace string.
  4. Restrict the find/replace action to a certain file type (*.html / *.htm).
  5. Define the path (directory) to where your topic files are.
  6. Maybe select "In all subfolders".
  7. Select "Regular expression".
  8. Hit "Replace in Files".

Here I'm searching for src="(.+?)/MyImage.png" – this is searching for the string =" followed by (.+?) followed by /MyImage.png".
That is, the regular expression is (.+?) is finding any folder or subfolder in the src path. I'm replacing it with "My/New/Path" here. Folder and file names are of course just placeholders here. You could do a manual replace of one image first to get the right full path for the "Replace with" field.

But be aware, that if your topics are spread over multiple sub-folders and sub-sub-folders, you might need to restrict the search string first to get the right consolidation.

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
Adobe Employee ,
Mar 25, 2019 Mar 25, 2019

Copy link to clipboard

Copied

Ah, I was typing why the other answers came in. If the structure is as consistent as in your screenshot, then you can do the find/replace just like this (assuming here that your new folder is named "Shared-Images":

Find what: src="Images/Header Global.png"

Replace with: src="../Shared-Images/Header Global.png"

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 Beginner ,
Mar 25, 2019 Mar 25, 2019

Copy link to clipboard

Copied

Thanks for all of the responses Peter, Rick, and Stefan. All of those things you mentioned will work fine if I link all of the topics to that one image, which is what I will do. My idea was to do something like this. I don't think this is possible by normal means though. I think it would require some scripting.

automation.png

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 25, 2019 Mar 25, 2019

Copy link to clipboard

Copied

I have pinged someone who I believe knows the answer. Meantime, search the

forum as I believe this has been asked on a number of occasions.

Peter Grainge

www.grainge.org

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

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
Adobe Employee ,
Mar 25, 2019 Mar 25, 2019

Copy link to clipboard

Copied

LATEST

I don't think you need scripting for this. With that folder structure diagram you have drawn, it should be really just one or two search and replace runs.

Let's go through it:

Situation now:

\Topic_A\topic.html

\Topic_A\Images\Header Global.png

\Topic_B\topic.html

\Topic_B\Images\Header Global.png

\Topic_C\topic.html

\Topic_C\Images\Images\Header Global.png

\Topic_D\topic.html

\Topic_D\Images\Header Global.png

Situation target:

\Shared-Images\Header Global.png

\Topic_A\topic.html

\Topic_B\topic.html

\Topic_C\topic.html

\Topic_D\topic.html

Correct? If so:

Step 1:

Find what: src="Images/Header Global.png"

Replace with: src="../Shared-Images/Header Global.png"

Step 2:

Find what: src="Images/Images/Header Global.png"

Replace with: src="../Shared-Images/Header Global.png"

If the situation is more like this:

Situation now:

\Topic_A\topic.html

\Topic_A\Images\Header Global.png

\Topic_B\topic.html

\Topic_B\Images\Header Global.png

\Topic_C\Subtopic\topic.html

\Topic_C\Subtopic\Images\Images\Header Global.png

\Topic_D\topic.html

\Topic_D\Images\Header Global.png

(Situation target stays the same)

Do this:

Step 1 (limit search & replace scope to {Path to your topic folder root}\Topic_.\Subtopic\ - note the full stop after "Topic_" )

Find what: src="Images/Images/Header Global.png"

Replace with: src="../../Shared-Images/Header Global.png"

Step 2 (save now after step 1):

Find what: src="Images/Header Global.png"

Replace with: src="../Shared-Images/Header Global.png"

Your scenario might be different here and there. In a nutshell, when doing such search & replace things, it's generally a good idea to start "at the deepest level" and then work "upwards" (towards the utmost folder) to avoid conflicts/unresolvable (due to then missing distinguishability) consolidation.

(I get scared when I read that myself … too late in the evening now here. But it's actually pretty simple: Start with changing the image links in the deepest subfolder, then go up folder by folder up.

Cheers,

*Stefan.

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
Resources
RoboHelp Documentation
Download Adobe RoboHelp