{"id":257,"date":"2024-01-09T12:28:53","date_gmt":"2024-01-09T17:28:53","guid":{"rendered":"https:\/\/pressbooks.bccampus.ca\/pbtips\/?post_type=chapter&#038;p=257"},"modified":"2024-01-29T13:15:56","modified_gmt":"2024-01-29T18:15:56","slug":"resizing-oversized-images-in-exports","status":"publish","type":"chapter","link":"https:\/\/pressbooks.bccampus.ca\/pbtips\/chapter\/resizing-oversized-images-in-exports\/","title":{"raw":"Resizing Oversized Images in Exports","rendered":"Resizing Oversized Images in Exports"},"content":{"raw":"Pressbooks allows you to either upload or import images to your Media Library, and provides some simple, built-in editing tools which allow you to resize, crop, or scale your image.\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Resourcces<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nTo learn more about inserting and editing images Pressbooks, review the following guides:\r\n<ul>\r\n \t<li><a href=\"https:\/\/guide.pressbooks.com\/chapter\/media\/\">Pressbooks User Guide - Media<\/a><\/li>\r\n \t<li><a href=\"https:\/\/guide.pressbooks.com\/chapter\/image-editing\/\">Pressbooks User Guide - Image Editing<\/a><\/li>\r\n \t<li><a href=\"https:\/\/opentextbc.ca\/pressbooks\/chapter\/images-files\/\">BCcampus Open Education Pressbooks Guide - Images and Files<\/a><\/li>\r\n<\/ul>\r\n<\/div>\r\n<\/div>\r\n<div style=\"font-weight: 400\">\r\n<div>\r\n<h2>Issue<\/h2>\r\nLarger images may display well in the web book, but cause layout and formatting issues in the PDF export. You man also want an image smaller in the import to keep the PDF file size down and create a print-friendly layout.\r\n<h2>Solution<\/h2>\r\n[caption id=\"attachment_214\" align=\"aligncenter\" width=\"1024\"]<img class=\"wp-image-214 size-large\" src=\"https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-content\/uploads\/sites\/1918\/2023\/05\/Screenshot-2023-07-12-at-9.35.20-AM-1024x395.png\" alt=\"\" width=\"1024\" height=\"395\" \/> Remember when editing the Custom Styles Sheet, you can customize the Web, PDF, and Ebook versions. If you want the change to occur across all three formats, you will need to copy the code to each drop-down (top).[\/caption]\r\n\r\nBy adding CSS to Custom styles you can force the image to resize in the PDF exports only.\r\n<ol>\r\n \t<li>On the Dashboard, select<strong> Appearance<\/strong> then<strong> Custom Styles<\/strong><\/li>\r\n \t<li>At the top of the page, select <strong>PDF<\/strong> on the dropdown menu labelled <strong>You are currently editing styles for: <\/strong><\/li>\r\n \t<li>In the <strong>Your PDF Styles<\/strong> box, add the CSS shown below and save<\/li>\r\n \t<li>Go to the image in your text and click <strong>edit. <\/strong>Under <strong>Advanced Options<\/strong> enter \"highresimage\" into the <strong>Image Class CSS<\/strong> field.<\/li>\r\n \t<li>You can then adjust the height and width in pixels in the custom CSS to resize the image in the PDF.<\/li>\r\n<\/ol>\r\n<\/div>\r\n<\/div>\r\n<div>\r\n<div class=\"textbox\">\r\n\r\n<strong>Custom CSS:<\/strong>\r\n<div><\/div>\r\n<div>\r\n\r\n.highresimage {\r\nwidth:475px!important;\r\nheight:837px!important;\r\n}\r\n\r\n<\/div>\r\n<\/div>\r\n&nbsp;\r\n\r\n<\/div>","rendered":"<p>Pressbooks allows you to either upload or import images to your Media Library, and provides some simple, built-in editing tools which allow you to resize, crop, or scale your image.<\/p>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Resourcces<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>To learn more about inserting and editing images Pressbooks, review the following guides:<\/p>\n<ul>\n<li><a href=\"https:\/\/guide.pressbooks.com\/chapter\/media\/\">Pressbooks User Guide &#8211; Media<\/a><\/li>\n<li><a href=\"https:\/\/guide.pressbooks.com\/chapter\/image-editing\/\">Pressbooks User Guide &#8211; Image Editing<\/a><\/li>\n<li><a href=\"https:\/\/opentextbc.ca\/pressbooks\/chapter\/images-files\/\">BCcampus Open Education Pressbooks Guide &#8211; Images and Files<\/a><\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div style=\"font-weight: 400\">\n<div>\n<h2>Issue<\/h2>\n<p>Larger images may display well in the web book, but cause layout and formatting issues in the PDF export. You man also want an image smaller in the import to keep the PDF file size down and create a print-friendly layout.<\/p>\n<h2>Solution<\/h2>\n<figure id=\"attachment_214\" aria-describedby=\"caption-attachment-214\" style=\"width: 1024px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-214 size-large\" src=\"https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-content\/uploads\/sites\/1918\/2023\/05\/Screenshot-2023-07-12-at-9.35.20-AM-1024x395.png\" alt=\"\" width=\"1024\" height=\"395\" srcset=\"https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-content\/uploads\/sites\/1918\/2023\/05\/Screenshot-2023-07-12-at-9.35.20-AM-1024x395.png 1024w, https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-content\/uploads\/sites\/1918\/2023\/05\/Screenshot-2023-07-12-at-9.35.20-AM-300x116.png 300w, https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-content\/uploads\/sites\/1918\/2023\/05\/Screenshot-2023-07-12-at-9.35.20-AM-768x296.png 768w, https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-content\/uploads\/sites\/1918\/2023\/05\/Screenshot-2023-07-12-at-9.35.20-AM-65x25.png 65w, https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-content\/uploads\/sites\/1918\/2023\/05\/Screenshot-2023-07-12-at-9.35.20-AM-225x87.png 225w, https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-content\/uploads\/sites\/1918\/2023\/05\/Screenshot-2023-07-12-at-9.35.20-AM-350x135.png 350w, https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-content\/uploads\/sites\/1918\/2023\/05\/Screenshot-2023-07-12-at-9.35.20-AM.png 1497w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption id=\"caption-attachment-214\" class=\"wp-caption-text\">Remember when editing the Custom Styles Sheet, you can customize the Web, PDF, and Ebook versions. If you want the change to occur across all three formats, you will need to copy the code to each drop-down (top).<\/figcaption><\/figure>\n<p>By adding CSS to Custom styles you can force the image to resize in the PDF exports only.<\/p>\n<ol>\n<li>On the Dashboard, select<strong> Appearance<\/strong> then<strong> Custom Styles<\/strong><\/li>\n<li>At the top of the page, select <strong>PDF<\/strong> on the dropdown menu labelled <strong>You are currently editing styles for: <\/strong><\/li>\n<li>In the <strong>Your PDF Styles<\/strong> box, add the CSS shown below and save<\/li>\n<li>Go to the image in your text and click <strong>edit. <\/strong>Under <strong>Advanced Options<\/strong> enter &#8220;highresimage&#8221; into the <strong>Image Class CSS<\/strong> field.<\/li>\n<li>You can then adjust the height and width in pixels in the custom CSS to resize the image in the PDF.<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<div>\n<div class=\"textbox\">\n<p><strong>Custom CSS:<\/strong><\/p>\n<div><\/div>\n<div>\n<p>.highresimage {<br \/>\nwidth:475px!important;<br \/>\nheight:837px!important;<br \/>\n}<\/p>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<\/div>\n","protected":false},"author":1076,"menu_order":1,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-257","chapter","type-chapter","status-publish","hentry"],"part":266,"_links":{"self":[{"href":"https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-json\/pressbooks\/v2\/chapters\/257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-json\/wp\/v2\/users\/1076"}],"version-history":[{"count":1,"href":"https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-json\/pressbooks\/v2\/chapters\/257\/revisions"}],"predecessor-version":[{"id":258,"href":"https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-json\/pressbooks\/v2\/chapters\/257\/revisions\/258"}],"part":[{"href":"https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-json\/pressbooks\/v2\/parts\/266"}],"metadata":[{"href":"https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-json\/pressbooks\/v2\/chapters\/257\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-json\/wp\/v2\/media?parent=257"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-json\/pressbooks\/v2\/chapter-type?post=257"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-json\/wp\/v2\/contributor?post=257"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/pbtips\/wp-json\/wp\/v2\/license?post=257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}