HTML conversion clears image alt text and original image filename
See original GitHub issueConverting to HTML clears any indication of the original image filename. Renamed images also don’t correspond to the “image0, image1, etc” convention used when exporting to HTML from Google Docs, so there isn’t a clean way to figure out which image file goes with which broken element.
ex, with a Google Docs filename starting with “Deploying”:
<img src="images/Deploying4.png" width="" alt="alt_text" title="image_tooltip">
The HTML export directly from Google Docs contains the alt text:
<img alt="object_id.png" src="images/image3.png" ...
Unless I’m overlooking something, preserving the alt attribute seems necessary for fixing an exported file.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Image Alt Text vs. Title Text vs. File Names: What's the ...
Alt text, or alternative text, is used to display text that describes an image to “alternative” sources. Primarily, its goal is to make...
Read more >Can I write text stored as objects into the "alt" attribute for an ...
Declare a const object listing the alternative text for each image. Loop through the array of filenames, and for each one, insert an...
Read more >Image SEO: How to optimize your alt text and title text - Yoast
1. When you’re logged in, you will be in your ‘Dashboard’. 2. Open the post or page to edit the content. 3. You...
Read more >Alt Text: Why It's Important For Accessibility & SEO - Moz
Alt text provides better image context/descriptions to search engine crawlers, helping them to index and rank an image properly in image search. It...
Read more >Auto Image Attributes From Filename With Bulk Updater (Add ...
Automatically add Image attributes such as Image Title, Image Caption, Description And Alt Text from Image Filename. The plugin can update image attributes...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
nvillahermosa,
Apparently, when you download a Doc as a zipped web page (along with images), Docs assigns a filename to each image and drawing to create it and put it in the images/ dir of the zip file.
Unfortunately, when we’re converting a Doc to Markdown or HTML, the images and drawings do not have any file name assigned – getAltTitle() and getAltDescription() generally return null. I’ll investigate some more, but it’s not going to be as easy as I had hoped 😦
As of today’s update (1.0β25), the image path is now in the form images/image1.png, images/image2.jpg, etc. However, beware that the exported zip file from Google Docs does not always have the images in the same order, so you’ll still need to check that the images are referenced in the correct place in your converted doc. There does not seem to be any rhyme nor reason about the order in the exported zip file that you get from Download > Web Page.