{"id":45,"date":"2018-06-02T20:10:18","date_gmt":"2018-06-02T20:10:18","guid":{"rendered":"https:\/\/kweaver.org\/cs\/mobile-web-responsive-images-grunt\/"},"modified":"2018-06-02T20:10:18","modified_gmt":"2018-06-02T20:10:18","slug":"mobile-web-responsive-images-grunt","status":"publish","type":"post","link":"https:\/\/kweaver.org\/cs\/mobile-web-responsive-images-grunt\/","title":{"rendered":"Mobile Web &#8211; Responsive Images &#8211; Grunt"},"content":{"rendered":"<p>One of the things that has been giving the MWS track fits is creating responsive images. &#0160;<\/p>\n<p>The course suggests setting up an automated build process using with ImageMagick or ImageOptim. &#0160;I&#39;m running a Mac, and I chose ImageMagick.<\/p>\n<p>First you have to install Node.js. &#0160;Directions are at&#0160;<a href=\"https:\/\/docs.npmjs.com\/getting-started\/installing-node\" title=\"NPM Getting Started\">https:\/\/docs.npmjs.com\/getting-started\/installing-node.<\/a>&#0160; There are very good directions on this site for installing Node.js . &#0160;I used the MacOS installer and updated everything.<\/p>\n<p>I then installed ImageMagick using&#0160;http:\/\/imagemagick.org\/script\/index.php . They had suggested another link but it indicated that it didn&#39;t work with the current Mac operating system. &#0160;I am not sure how I originally installed it, but I ended up copying the latest version and putting it in the place the other one was.<\/p>\n<p>ImageMagick automates a lot of the work that GIMP and Photoshop does &#8212; resize images, make animated gifs, crop and other fun stuff.<\/p>\n<p>For a mobile web app, we want to compress the images and make about three different versions, a small, medium and large version basically for phone, tablet or large desktop screens.<\/p>\n<p>The next thing we need is Grunt. &#0160;Grunt is a task runner &#8212; if we set up Grunt correctly, then we can take any group of images and make them responsive. &#0160;We&#39;re also going to use it later to set up our Mobile Web environment.&#0160;<\/p>\n<p>I followed this document:&#0160;https:\/\/gruntjs.com\/getting-started &#0160;to get started.<\/p>\n<p>There is lots of documentation on using Grunt\/Imagick\/Responsive Images. &#0160; The reading that was provided in the course was:&#0160;https:\/\/addyosmani.com\/blog\/generate-multi-resolution-images-for-srcset-with-grunt\/<\/p>\n<p>Here&#39;s the files I used for the project: &#0160;https:\/\/github.com\/kathweaver\/images&#0160;<\/p>\n<p>&#0160;<\/p>\n<p>&#0160;<\/p>\n<p>&#0160;<\/p>\n<p>&#0160;<\/p>\n<p>&#0160;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the things that has been giving the MWS track fits is creating responsive images. &#0160; The course suggests setting up an automated build process using with ImageMagick or ImageOptim. &#0160;I&#39;m running a Mac, and I chose ImageMagick. First you have to install Node.js. &#0160;Directions are at&#0160;https:\/\/docs.npmjs.com\/getting-started\/installing-node.&#0160; There are very good directions on this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-45","post","type-post","status-publish","format-standard","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/posts\/45","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/comments?post=45"}],"version-history":[{"count":0,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/posts\/45\/revisions"}],"wp:attachment":[{"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/media?parent=45"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/categories?post=45"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/tags?post=45"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}