Page MenuHomePhabricator

Centered images not centered on export
Open, Needs TriagePublicBUG REPORT

Description

Background: Images with the following markup are not centered in EPUBs or PDFs:

[[File:Filename.jpg|center|...]]

In the site HTML, they look something like this:

<div class="center"><div class="floatnone"><a href="/wiki/File:Tom_Swift_in_Captivity.djvu" class="image"><img alt="Tom Swift in Captivity.djvu" src="//upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Tom_Swift_in_Captivity.djvu/page1-300px-Tom_Swift_in_Captivity.djvu.jpg" decoding="async" width="300" height="456" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Tom_Swift_in_Captivity.djvu/page1-450px-Tom_Swift_in_Captivity.djvu.jpg 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Tom_Swift_in_Captivity.djvu/page1-600px-Tom_Swift_in_Captivity.djvu.jpg 2x" data-file-width="2450" data-file-height="3724"></a></div></div>

In the EPUB export, they are just

<img xmlns="http://www.w3.org/1999/xhtml" resource="./File:Tom_Swift_in_Captivity.djvu" src="images/c26_page1_300px_Tom_Swift_in_Captivity.djvu.jpg" data-file-type="office" id="mwBQ" style="width:300; height:456; " data-title="page1-300px-Tom_Swift_in_Captivity.djvu.jpg" data-lnum="5" />

The following files how this in the first image:


You can reproduce this issue by downloading an EPUB or PDF from the following link: https://en.wikisource.org/wiki/Tom_Swift_in_Captivity

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenBUG REPORTNone

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@Inductiveload Can you provide the links to the original books on Wikisource? When I tried to look them up by title ("Tom Swift in Captivity"), I couldn't find them for some reason. Thanks!

@Inductiveload Can you provide the links to the original books on Wikisource? When I tried to look them up by title ("Tom Swift in Captivity"), I couldn't find them for some reason. Thanks!

Thank you, @Inductiveload! I have been able to reproduce the issue & will update the ticket description with the link you provided.