Hi team,
I am having an issue when images have the same name in different projects - in fact, this has been an issue for me since I started using H&M a couple of years ago. I work for a software company and many of our products overlap in the manuals, which means the same images are used in different projects. Even when these images are stored in different folders, it sometimes results in issues. If I delete the image in one folder, it will then not appear in the other project that shares the same image. Or, if I create a new image that has the same name of an existing file that is in a different folder, it will not save correctly. Is this a known issue? Please help, as it is costing me time.
Thanks - and I love Help and Manual 99% of the time by the way
Sean
Problem when images have same name in different projects
Moderators: Alexander Halser, Tim Green
-
- Posts: 92
- Joined: Sun Apr 24, 2016 6:10 am
- Tim Green
- Site Admin
- Posts: 23183
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Problem when images have same name in different projects
Hi Sean,
It's very important to understand how Help+Manual finds the image files you reference in your projects, otherwise you will run into all kinds of problems, these included. Only the filename is stored in the topic. The file is found by searching through the folders listed in the Configuration > Common Properties > Project Search Path settings from top to bottom and using the FIRST file found with a matching name. This means that if there is a file with the same name in a folder further down it will never be used, because the first file matched the search and the search was then stopped.
This approach makes it very easy to make your projects portable, because you can move around and consolidate the image files at any time. You just need to change the locations to be searched in the search path section. The price you pay is that you have to be careful about duplicates.
Images with the same names and different formats:
You can also run into problems if you have two different images with the same names but different formats, for example introduction.bmp and introduction.png. In some output formats, images need to be converted to other formats to be used. For example, BMP can't be used in HTML, so it needs to be converted. In the above example, if your settings in Configuration > Publishing Options > WebHelp/CHM > HTML Export Options specify conversion to PNG you will have two different images with identical names. Whichever one is exported last will win, because it will overwrite the previous version in the output. For this reason it's safest to regard all image files with the same name before the extension as duplicates, no matter what their extension/format is.
It's very important to understand how Help+Manual finds the image files you reference in your projects, otherwise you will run into all kinds of problems, these included. Only the filename is stored in the topic. The file is found by searching through the folders listed in the Configuration > Common Properties > Project Search Path settings from top to bottom and using the FIRST file found with a matching name. This means that if there is a file with the same name in a folder further down it will never be used, because the first file matched the search and the search was then stopped.
This approach makes it very easy to make your projects portable, because you can move around and consolidate the image files at any time. You just need to change the locations to be searched in the search path section. The price you pay is that you have to be careful about duplicates.
Images with the same names and different formats:
You can also run into problems if you have two different images with the same names but different formats, for example introduction.bmp and introduction.png. In some output formats, images need to be converted to other formats to be used. For example, BMP can't be used in HTML, so it needs to be converted. In the above example, if your settings in Configuration > Publishing Options > WebHelp/CHM > HTML Export Options specify conversion to PNG you will have two different images with identical names. Whichever one is exported last will win, because it will overwrite the previous version in the output. For this reason it's safest to regard all image files with the same name before the extension as duplicates, no matter what their extension/format is.
Well if all your projects are referencing the image in the same folder that is what you would expect, because there is only one copy of it being used by all projects.If I delete the image in one folder, it will then not appear in the other project that shares the same image.
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
-
- Posts: 92
- Joined: Sun Apr 24, 2016 6:10 am
Re: Problem when images have same name in different projects
Great, thanks Tim - I will jiggle things and get back to you.
Sean
Sean