View Single Post
Old 11-22-2022, 10:37 AM   #4
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,361
Karma: 20212223
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
....although that brings up the question of WHY you want an image to be on it's own page??

If it truly needs to be all by itself on the page then I would recommend wrapping it in an svg...that solves most of the image issues.

Spoiler:

Code:
<div style="margin:0; padding:0">
    <svg 
		xmlns="http://www.w3.org/2000/svg" 
		height="99vh" width="99vw" 
		preserveAspectRatio="xMidYMid meet" version="1.1" 
		viewBox="0 0 400 600" 
		xmlns:xlink="http://www.w3.org/1999/xlink">
        <image width="400" height="600" xlink:href="../Images/cover.jpg"/>
    </svg>
 </div>


You can even give Sigil a template file that will do this for you when you select TOOLS/Add Cover. It automagically adds the proper image width/height/filename

Just add the COMPLETE xhtml file to your Sigil Preferences Location (EDIT/PREFERENCES/Open Preferences Location) and name it "cover.xhtml"

Here is the one I use... you can modify it however you wish:
Spoiler:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Cover</title>
</head>

<body style="margin:0; padding:0; text-align:center; background-color:black">
  <h1 style="display:none" title="Cover"/>

  <div style="margin:0; padding:0">
    <svg 
		xmlns="http://www.w3.org/2000/svg" 
		height="99vh" width="99vw" 
		preserveAspectRatio="xMidYMid meet" version="1.1" 
		viewBox="0 0 SGC_IMAGE_WIDTH SGC_IMAGE_HEIGHT" 
		xmlns:xlink="http://www.w3.org/1999/xlink">
        <image width="SGC_IMAGE_WIDTH" height="SGC_IMAGE_HEIGHT" xlink:href="SGC_IMAGE_FILENAME"/>
    </svg>
  </div>
</body>
</html>




Edit: I almost forgot to mention CalibUser's Sigil plugin: InsertImageSVG

Last edited by Turtle91; 11-22-2022 at 10:41 AM.
Turtle91 is offline   Reply With Quote