I am making a ebook to publish on kindle, this book in every chapter it starts with an image (this image occupies the entire page). I have been for quite some time trying to figure out how to make a table of contents that leads to a image.
Anyone knows how?
My suggestion would be to make a paragraph style applied to text that describes the image. Put this text box under the image so that the image covers it, maybe on its own layer. Use the Layout > Table of Contents generator to make the ToC, which might sit on a page or off to one side of a page on the pasteboard. Use the Articles panel to include graphics and text that you want in the epub, but leave out of the Article panel the textboxes that describe the images and which are used to make the ToC.
That's it. Create a style ("ImageAnchor") that is formatted to hold the image exactly as you want it to appear. (Create a corresponding object style for the images, as well, for consistent formatting and control.) Then include 'ImageAnchor' as a TOC element.
What can be difficult is including a TOC entry with meaningful text. You can put the text ("Chapter One: The Horror") in the image anchor style, but making that text invisible in the exported EPUB can be tricky. One method is to make the text tiny (1-2pt) and white, although that will show on a dark reader background. There are other methods, but they get increasingly complex and require CSS styling of the exported file, and work erratically on various EPUB viewers.
I haven't tested your proposed workflow, here, Mike, but I suspect it won't work very well. EVERYTHING in an ID file goes into an EPUB. There are no "hidden beneath" or "off the page" areas as you might exploit in printing.
The only variation I can think of that might work is to make the crypto-text conditional, so that the TOC can be generated and then the text hidden... and I suspect that would have glitches as well. EPUB export is a real PITA when it comes to trying to fool that dumb "one flow to rule them all" model. 🙂