Highlighted

Faster way to replace images in Robohelp?

New Here ,
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

308

Likes

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

Faster way to replace images in Robohelp?

New Here ,
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

309

Likes

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
Mar 25, 2019 0
Adobe Community Professional ,
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

www.grainge.org for free RoboHelp & Authoring info. Use the blue Reply button at the top to help me help you.
The black Reply link nests replies and they sort out of order.

Likes

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
Reply
Loading...
Mar 25, 2019 0
LEGEND ,
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

Likes

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
Reply
Loading...
Mar 25, 2019 0
LEGEND ,
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

Likes

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
Reply
Loading...
Mar 25, 2019 1
New Here ,
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.

Likes

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
Reply
Loading...
Mar 25, 2019 0
Adobe Community Professional ,
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

www.grainge.org for free RoboHelp & Authoring info. Use the blue Reply button at the top to help me help you.
The black Reply link nests replies and they sort out of order.

Likes

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
Reply
Loading...
Mar 25, 2019 0
Adobe Employee ,
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.

Likes

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
Reply
Loading...
Mar 25, 2019 0
Adobe Employee ,
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"

Likes

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
Reply
Loading...
Mar 25, 2019 0