diff --git a/src/calibre/srv/render_book.py b/src/calibre/srv/render_book.py
index 6756b64c9d..e5fe1d9095 100644
--- a/src/calibre/srv/render_book.py
+++ b/src/calibre/srv/render_book.py
@@ -239,8 +239,12 @@ class Container(ContainerBase):
templ = '''
'''
if input_fmt == 'epub':
diff --git a/src/pyj/read_book/resources.pyj b/src/pyj/read_book/resources.pyj
index cea712acf1..b8dd57d52a 100644
--- a/src/pyj/read_book/resources.pyj
+++ b/src/pyj/read_book/resources.pyj
@@ -42,7 +42,7 @@ def load_resources(db, book, root_name, previous_resources, proceed):
def got_one(data, name, mimetype):
if False and name is book.manifest.title_page_name:
# Enable to have cover image not preserve aspect ratio
- data = data.replace('width: auto', 'width: 100%')
+ data = data.replace('width: auto; height: auto', 'width: 100vw; height: 100vh')
ans[name] = v'[data, mimetype]'
if jstype(data) is 'string':
find_virtualized_resources(data)