Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Export EPUB with image class tags

Return to Member Forum

  • Author
    Posts
    • #80032

      I do a lot of ebook designs/conversions, and I use a custom CSS template that I’ve evolved over time. One of the things I do through this external CSS is apply some scaling attributes to images in the ebook, like the cover and any interior images. The CSS just makes sure that said images proportionally scale down to fit certain percentage widths and heights of the screen the user is viewing the EPUB on. MY CSS performs great, but my problem is that I cannot get InDesign to export my images with an img class tag.

      How do you tell InDesign that you want it to apply a specific image class style to an image on export? No matter what I try, I can’t get it to export any type of image class. The only “img” attribute it will export is “alt”. So right now I have to edit my code for each book to manually add in the class=”stylename” tag into each image. This is annoying, and there has to be a better way.

      I did find that if I allow InDesign to generate a CSS for export, it does add img class tags to all the images, but only with its own made up styles, not based on the object styles I assigned in the export tagging option.

      Does anyone know how to make InDesign add a specific img class value to images exported into EPUB?

      P.S. Below shows the EPUB code that InDesign exports and what I actually want it to be (had to alter structure to avoid the forum reading this as actual code):

      *What I want*: < d i v class=”ipadfp” > < img class=”imagefp” alt=”” src=”xyz.jpg” …

      *What I get without ID generating CSS*: < d i v class=”ipadfp” > < img alt=”” src=”xyz.jpg” …

      *What I get if ID does generate CSS*: < d i v class=”ipadfp” > < img class=”_idGenObjectAttribute-1″ alt=”” src=”xyz.jpg” …

Viewing 0 reply threads
  • The forum ‘EPUB and eBook’ is closed to new topics and replies.
Forum Ads