Quick Post About Uploading Images Via Org-mode and Org2Blog

Upload icon of a sunset photograph

Figure 1: Attribution: By ~~helix84 (2007), Philverney (9 November 2005), David Vignoni (December 6, 2005) LGPL: http://www.gnu.org/licenses/lgpl.html or Public domain, via Wikimedia Commons (search for “Icon – upload photo 2.svg”)

Today I’m experimenting with image uploads on org-mode and org2blog. I don’t expect to write a lot but hopefully I’ll learn a bit. 😀

I refer heavily to one of my “go-to” pages on org-mode: Fabrice Niessen’s Github Reference Card for Org-mode. Most of what I’ll talk about in this post will be derived from this reference card.

Standard Image Upload with Caption

This is the first way I learned how to upload a picture. Essentially, you surround the path to your file with square brackets like so:

#+CAPTION: Attribution: By ~~helix84 (2007), Philverney (9 November 2005), David Vignoni (December 6, 2005) LGPL: http://www.gnu.org/licenses/lgpl.html or Public domain, via Wikimedia Commons (search for "Icon - upload photo 2.svg")
#+ATTR_HTML: :alt Upload icon of a sunset photograph :title Upload icon of a sunset photograph :align center
[[./img/512px-Icon_-_upload_photo_2.svg.png]]

This is basically how I created the the header image on this post. You’ll also note that you can add a caption that appears under the picture as well as include attributes that will affect the alignment and other aspects of the image.

An Image with an Embedded URL

This is something new I just figured out. You can create an image that also has a URL embedded in it. This is useful if you want to link to the image’s source on the Internet:

coffee_vader_faith.jpg

The org code looks like this:

[[https://imgflip.com/i/10xbet][file:./img/coffee_vader_faith.jpg]]

A Video Link

Another new thing I learned today is that you can even link to a video and use an image as the link to it:

screen.png

The org code for the above image and link are as follows:

[[https://www.youtube.com/watch?v=oJTwQvgfgMM][file:./img/screen.png]]

I hope this has been helpful. Please check out Fabrice Niessen’s Github Reference Card for Org-mode. It’s really useful and terse so you’re not hunting through paragraphs of information to find what you need.

Useful Links

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: