Is there a way to search my TBx file for images in order to replace them with links. I have not been able to find how to build tha query that will find all notes containing one or more images. I think it should be along the lines of: $Text.contains(matchStr) where the string contains characters unique to images. Perhaps a regex is needed?
I’ve searched the Forum and the rich aTbRef without success to find how inline images are stored in a note.
I have not used images extensively but recent discussions in the Forum and email correspondence suggest the speed of the file could be boosted by removing images.
For context, I consider my file a modest one at 473 MB with 11 children, 2045 descendents, and 147,146 words with descendants.
Sample file attached with one note and one image. As I was not sensitive to storage space issues, the image in the test has not been processed in any way to reduce its size. That is also true with the images in my work file.
I’d be interested in what you’re working on. For my work, I’ve found hosting the image on my hardriving and “pulling” the image through preview/export is the most optimal approach.
Thanks for your note, Michael. I had looked at your video in 2021 but confess to having overlooked when researching for this exercise. Have rewatched Part 1 and tried to implement. The video is packed with great information. TextExpander will be a big help, especially when the $MediaFile value in included.
I use this tag: <img src=“File:////Users/doug_user/Library/CloudStorage/Dropbox/Tinderbox/CatchAllNotesImages/Medicare_DJ.png"> in a note. The folder with images is in the folder that contains the TBX file. However, when I click “Preview” I get only the line or two of unrelated text in the note and not the image. In the Preview, the tag is not visible, just open space. I tried both jpg and png versions of the image with same result.
When I try linking to an image on my local HD, the tag works. Is the location on Dropbox in the Cloud the issue? When I use the path beginning with “File:” in $URL and click the globe, it opens the image immediately in Preview.app.
I’m totally ignorant on HTML so am wondering if there are some elements there that would help TBX make the connection.
Hoping there is an easy answer but will adjust if needed.
Not, this is a VERY old video…text expander is fine to use especially when you’re working with long form documents, but so is the use of templates and ^include("note-name","tMedia template")^ is also my recommended approach. I don’t think Part 1 or Part 2 talk about the include approach.