{"id":40,"date":"2017-02-18T14:43:23","date_gmt":"2017-02-18T19:43:23","guid":{"rendered":"https:\/\/pressbooks.bccampus.ca\/oerworkshop\/?post_type=chapter&#038;p=40"},"modified":"2017-02-23T20:31:37","modified_gmt":"2017-02-24T01:31:37","slug":"embedding-images-and-videos-within-your-open-textbook","status":"publish","type":"chapter","link":"https:\/\/pressbooks.bccampus.ca\/oerworkshop\/chapter\/embedding-images-and-videos-within-your-open-textbook\/","title":{"raw":"Embedding Images and Videos within your Open Textbook","rendered":"Embedding Images and Videos within your Open Textbook"},"content":{"raw":"<h1>Embedding Images<\/h1>\r\nOnce you have found an image that you want to embed\u00a0within\u00a0a chapter of your open textbook, navigate to that chapter and place your mouse cursor in the approximate position where you would like to place the image. Click on the \u201cAdd Media\u201d button above the toolbar.\r\n\r\nOnce you are here, there are two ways to add an image. You\u00a0can either select\u00a0an image from a folder and drag it right into the middle of the window. Or we can click on \u201cSelect Files\u201d and then select the image that we want to add.\r\n<div class=\"textbox shaded\">\r\n\r\n<em>Important:<\/em>\r\n\r\nAn image file must be a JPG, PNG or GIF. Other file formats will produce an error message and will not be accepted.\r\n\r\nAn image file must be uploaded into the Media Library for use. You cannot add an image by linking to an external source.\r\n\r\n<\/div>\r\nOnce the image is uploaded, you can click edit its details:\r\n<ol>\r\n \t<li>If you look\u00a0over\u00a0to the fields on the right, you\u00a0can change the image\u2019s title.\u00a0Right below that, you\u00a0can alter its caption (the caption is\u00a0the text that appears in small font beneath the image in the book). You may use the caption field to enter the proper attribution for your image (<a href=\"http:\/\/www.openwa.org\/open-attrib-builder\/\">see the Open Washington attribution tool)<\/a>. Underneath that, the alt text is how the image will be described by things like screen readers for the hearing impaired \u2013 so think of it as a description of the image if the image doesn\u2019t show up. So here we need something like, \u2018A parakeet standing next to a chessboard\u2019. Just a clear, accurate description of the photo.<\/li>\r\n \t<li>You\u00a0can also change the attachment display settings. We typically want our images centre-aligned, that tends to work out best for viewing the book, so we want to click on \u201cAlignment \u2013 centre\u201d.<\/li>\r\n \t<li>In the \u201cLink To\u201d panel we can choose what happens when we click on the image. So if we select \u201cnone\u201d, the image doesn\u2019t link anywhere. If we select \u201cMedia file,\u201d then clicking on the image links to the full-sized version of the image. If we select \u201cattachment page,\u201d clicking on the image links to the attachment page, which also features the image\u2019s title and description. And if we click on \u201ccustom URL\u201d, then clicking on the image will take us to whatever URL we put in the URL field, so that allows the image to act like a hyperlink. So, for now, we\u2019ll just say that we want this to link to the media file, to the full-sized image.<\/li>\r\n \t<li>And then finally, we can select the image\u2019s display size. So, let\u2019s say I want this image to shrink to 300 pixels across. Now, obviously, the original file here is 4000 pixels across, it\u2019s massive. In order to shrink the display down to 300 pixels, I select the \u201cMedium\u201d size. And then I can insert this image into the post. And you can see that the shrunken image appears in the middle there. So we\u2019ll click on \u201cUpdate\u201d. And then we\u2019ll go into our \u201cBook view\u201d. And we\u2019ll refresh the page. And you\u2019ll see that the image is shrunk down on the page to 300 pixels, and, if we click on it, you can see the full size image here.<\/li>\r\n<\/ol>\r\nOne more thing:\u00a0Now that you've\u00a0inserted our image into the page, if you\u00a0want to make any edits, you\u00a0can just click on the image, and then click on the pencil that appears in the popup menu above, and once again, we can edit the image\u2019s details or its display settings.\r\n<div class=\"textbox examples\">\r\n<h3 itemprop=\"educationalUse\">Video Overview<\/h3>\r\n<div style=\"text-align: center\"><iframe src=\"https:\/\/www.youtube.com\/embed\/ymXZhsQARO4\" width=\"500\" height=\"281\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/div>\r\n<\/div>\r\n<h1>Embedding Videos<\/h1>\r\nOnce you find a video clip from YouTube that you would like to embed within your chapter, click on the \"Share\" button that lies right below the video's title. Next, click on the \"Embed\" tab. When you do this, YouTube automatically produces and selects the HTML code that you need. Copy the HTML code.\r\n\r\nNavigate back to your chapter and click on the \"Text (HTML)\" tab that lies\u00a0right above the toolbar. Scroll down the page to where you\u00a0would like to embed your image (although you are looking at the HTML code you should still be able to read your text). Next, paste the HTML code that you copied from YouTube. Once you do this, switch back to the \"Visual\" tab to verify that you\u00a0have placed the video at the desired\u00a0position (if not, go back and move the HTML code you pasted from YouTube). You will see that Pressbooks automatically embeds your selected video within the chapter. Click \"Update\" on the right sidebar to save your changes.\r\n\r\n<em>Important: Although it is nice to be able to use YouTube clips that have a Creative Commons license, this method allows you to embed\u00a0any clip from YouTube. Because you are not downloading the video clip and only linking to it, this is permissible.<\/em>\r\n<div class=\"textbox key-takeaways\">\r\n<h3 itemprop=\"educationalUse\">Source<\/h3>\r\nAdapted from\u00a0<a href=\"https:\/\/opentextbc.ca\/pressbooks\/\">BC Open Textbook Pressbooks Guide <\/a><span>by <a href=\"https:\/\/bccampus.ca\/\">BCcampus<\/a>. <\/span><a href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC-BY 4.0<\/a>\r\n\r\n<\/div>","rendered":"<h1>Embedding Images<\/h1>\n<p>Once you have found an image that you want to embed\u00a0within\u00a0a chapter of your open textbook, navigate to that chapter and place your mouse cursor in the approximate position where you would like to place the image. Click on the \u201cAdd Media\u201d button above the toolbar.<\/p>\n<p>Once you are here, there are two ways to add an image. You\u00a0can either select\u00a0an image from a folder and drag it right into the middle of the window. Or we can click on \u201cSelect Files\u201d and then select the image that we want to add.<\/p>\n<div class=\"textbox shaded\">\n<p><em>Important:<\/em><\/p>\n<p>An image file must be a JPG, PNG or GIF. Other file formats will produce an error message and will not be accepted.<\/p>\n<p>An image file must be uploaded into the Media Library for use. You cannot add an image by linking to an external source.<\/p>\n<\/div>\n<p>Once the image is uploaded, you can click edit its details:<\/p>\n<ol>\n<li>If you look\u00a0over\u00a0to the fields on the right, you\u00a0can change the image\u2019s title.\u00a0Right below that, you\u00a0can alter its caption (the caption is\u00a0the text that appears in small font beneath the image in the book). You may use the caption field to enter the proper attribution for your image (<a href=\"http:\/\/www.openwa.org\/open-attrib-builder\/\">see the Open Washington attribution tool)<\/a>. Underneath that, the alt text is how the image will be described by things like screen readers for the hearing impaired \u2013 so think of it as a description of the image if the image doesn\u2019t show up. So here we need something like, \u2018A parakeet standing next to a chessboard\u2019. Just a clear, accurate description of the photo.<\/li>\n<li>You\u00a0can also change the attachment display settings. We typically want our images centre-aligned, that tends to work out best for viewing the book, so we want to click on \u201cAlignment \u2013 centre\u201d.<\/li>\n<li>In the \u201cLink To\u201d panel we can choose what happens when we click on the image. So if we select \u201cnone\u201d, the image doesn\u2019t link anywhere. If we select \u201cMedia file,\u201d then clicking on the image links to the full-sized version of the image. If we select \u201cattachment page,\u201d clicking on the image links to the attachment page, which also features the image\u2019s title and description. And if we click on \u201ccustom URL\u201d, then clicking on the image will take us to whatever URL we put in the URL field, so that allows the image to act like a hyperlink. So, for now, we\u2019ll just say that we want this to link to the media file, to the full-sized image.<\/li>\n<li>And then finally, we can select the image\u2019s display size. So, let\u2019s say I want this image to shrink to 300 pixels across. Now, obviously, the original file here is 4000 pixels across, it\u2019s massive. In order to shrink the display down to 300 pixels, I select the \u201cMedium\u201d size. And then I can insert this image into the post. And you can see that the shrunken image appears in the middle there. So we\u2019ll click on \u201cUpdate\u201d. And then we\u2019ll go into our \u201cBook view\u201d. And we\u2019ll refresh the page. And you\u2019ll see that the image is shrunk down on the page to 300 pixels, and, if we click on it, you can see the full size image here.<\/li>\n<\/ol>\n<p>One more thing:\u00a0Now that you&#8217;ve\u00a0inserted our image into the page, if you\u00a0want to make any edits, you\u00a0can just click on the image, and then click on the pencil that appears in the popup menu above, and once again, we can edit the image\u2019s details or its display settings.<\/p>\n<div class=\"textbox examples\">\n<h3 itemprop=\"educationalUse\">Video Overview<\/h3>\n<div style=\"text-align: center\"><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/ymXZhsQARO4\" width=\"500\" height=\"281\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/div>\n<\/div>\n<h1>Embedding Videos<\/h1>\n<p>Once you find a video clip from YouTube that you would like to embed within your chapter, click on the &#8220;Share&#8221; button that lies right below the video&#8217;s title. Next, click on the &#8220;Embed&#8221; tab. When you do this, YouTube automatically produces and selects the HTML code that you need. Copy the HTML code.<\/p>\n<p>Navigate back to your chapter and click on the &#8220;Text (HTML)&#8221; tab that lies\u00a0right above the toolbar. Scroll down the page to where you\u00a0would like to embed your image (although you are looking at the HTML code you should still be able to read your text). Next, paste the HTML code that you copied from YouTube. Once you do this, switch back to the &#8220;Visual&#8221; tab to verify that you\u00a0have placed the video at the desired\u00a0position (if not, go back and move the HTML code you pasted from YouTube). You will see that Pressbooks automatically embeds your selected video within the chapter. Click &#8220;Update&#8221; on the right sidebar to save your changes.<\/p>\n<p><em>Important: Although it is nice to be able to use YouTube clips that have a Creative Commons license, this method allows you to embed\u00a0any clip from YouTube. Because you are not downloading the video clip and only linking to it, this is permissible.<\/em><\/p>\n<div class=\"textbox key-takeaways\">\n<h3 itemprop=\"educationalUse\">Source<\/h3>\n<p>Adapted from\u00a0<a href=\"https:\/\/opentextbc.ca\/pressbooks\/\">BC Open Textbook Pressbooks Guide <\/a><span>by <a href=\"https:\/\/bccampus.ca\/\">BCcampus<\/a>. <\/span><a href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC-BY 4.0<\/a><\/p>\n<\/div>\n","protected":false},"author":28,"menu_order":8,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-40","chapter","type-chapter","status-publish","hentry"],"part":3,"_links":{"self":[{"href":"https:\/\/pressbooks.bccampus.ca\/oerworkshop\/wp-json\/pressbooks\/v2\/chapters\/40","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.bccampus.ca\/oerworkshop\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.bccampus.ca\/oerworkshop\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/oerworkshop\/wp-json\/wp\/v2\/users\/28"}],"version-history":[{"count":10,"href":"https:\/\/pressbooks.bccampus.ca\/oerworkshop\/wp-json\/pressbooks\/v2\/chapters\/40\/revisions"}],"predecessor-version":[{"id":139,"href":"https:\/\/pressbooks.bccampus.ca\/oerworkshop\/wp-json\/pressbooks\/v2\/chapters\/40\/revisions\/139"}],"part":[{"href":"https:\/\/pressbooks.bccampus.ca\/oerworkshop\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/pressbooks.bccampus.ca\/oerworkshop\/wp-json\/pressbooks\/v2\/chapters\/40\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.bccampus.ca\/oerworkshop\/wp-json\/wp\/v2\/media?parent=40"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/oerworkshop\/wp-json\/pressbooks\/v2\/chapter-type?post=40"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/oerworkshop\/wp-json\/wp\/v2\/contributor?post=40"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/oerworkshop\/wp-json\/wp\/v2\/license?post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}