{"id":2397,"date":"2013-09-18T17:47:01","date_gmt":"2013-09-18T22:47:01","guid":{"rendered":"https:\/\/blogs.mathworks.com\/community\/?p=2397"},"modified":"2013-09-18T17:47:01","modified_gmt":"2013-09-18T22:47:01","slug":"uploading-images-and-files-to-matlab-answers","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/community\/2013\/09\/18\/uploading-images-and-files-to-matlab-answers\/","title":{"rendered":"Uploading Images and Files to MATLAB Answers"},"content":{"rendered":"<p>Sometimes it takes more than words to <a title=\"a question\" href=\"https:\/\/www.mathworks.com\/matlabcentral\/answers\/540-how-do-i-create-a-plot-within-another-plot\">explain a question<\/a>\u00a0or <a title=\"an answer\" href=\"https:\/\/www.mathworks.com\/matlabcentral\/answers\/5501-colouring-stacked-bar-chart#answer_7692\">demonstrate an answer<\/a>. And starting today it&#8217;s much easier to enhance your questions and answers by inserting images and attaching files.<\/p>\n<h2>Direct uploads<\/h2>\n<p><a title=\"MATLAB Markup\" href=\"https:\/\/www.mathworks.com\/matlabcentral\/answers\/help\/markup\/\">MATLAB Markup<\/a>\u00a0allows you to\u00a0display images and link to files. But those images and files have to be hosted somewhere on the web. In the past, that meant finding a place to host your file, figuring out the URL to the file, and adding the URL to your markup. And then hoping that the hosting service does not \u00a0disable or remove the file. But now you can host your files directly on MATLAB Answers!<\/p>\n<p>Suppose I have an image that I want to use in my question. It&#8217;s saved on my computer. I&#8217;d like to add it to my question (or answer\u2013the process is the same). All I have to do is click on the image icon in the markup toolbar, choose the image from my computer, and insert it. We will upload the image in the background and add the correct markup:<\/p>\n<p><a href=\"https:\/\/blogs.mathworks.com\/community\/files\/insert-image.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-2426 alignnone\" style=\"border: 1px solid #dddddd;\" alt=\"insert-image\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/insert-image.png\" width=\"630\" height=\"222\" \/><\/a><\/p>\n<p><a href=\"https:\/\/blogs.mathworks.com\/community\/files\/markup-inserted.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-2427 alignnone\" style=\"border: 1px solid #dddddd;\" alt=\"markup-inserted\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/markup-inserted.png\" width=\"634\" height=\"366\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Attaching files works the same way. However, when you attach a file we don&#8217;t add any markup. Instead, a link to the file is added below the text of your question or answer (think of the way that email attachments work).<\/p>\n<h2>The old way still works<\/h2>\n<p>If you&#8217;d like to use an image hosted somewhere else, that&#8217;s cool. We don&#8217;t mind. In fact, now you have two ways to include it:<\/p>\n<ol>\n<li><span style=\"line-height: 13px;\">Directly type the markup. To insert an image all you have to do is include the image URL in double angle brackets. For example,\u00a0<code style=\"display: inline; padding-left: 0;\">&lt;&lt;http:\/\/mathworks.com\/matlabcentral\/images\/surf.gif&gt;&gt;<\/code>.<br \/>\n(Note: Make sure that there is a blank line before and after your image markup.)<\/span><\/li>\n<li>Use the new insert image button, but select &#8220;From the Web.&#8221; Type the image URL and we&#8217;ll insert the markup.<\/li>\n<\/ol>\n<p>We hope that these new tools make it easier for you to ask and answer questions!<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/insert-image.png\" onError=\"this.style.display ='none';\" \/><\/div>\n<p>Sometimes it takes more than words to explain a question\u00a0or demonstrate an answer. And starting today it&#8217;s much easier to enhance your questions and answers by inserting images and attaching&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/community\/2013\/09\/18\/uploading-images-and-files-to-matlab-answers\/\">read more >><\/a><\/p>\n","protected":false},"author":75,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[36],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/2397"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/comments?post=2397"}],"version-history":[{"count":30,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/2397\/revisions"}],"predecessor-version":[{"id":2446,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/2397\/revisions\/2446"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/media?parent=2397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/categories?post=2397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/tags?post=2397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}