I am using a Mac (El Capitan), and trying to use w3m. But I don't see images when browsing pages.

My question is: I want to view inline images in w3m, but don't find a way to do so.

I have been told that w3m can display inline images, and seen some video examples. But all the tutorials I found use Linux or the like, and I can't seem to make w3m display inline images.

I opened w3m in a terminal (either xterm or iterm2), and pressed o and set the display inline image option to yes, and re-launches w3m, but nothing happens.

Some say that one should install w3m-img, but I cannot find a package named as such. Others say that one should enable frame buffer; however, I don't know how to do that either.

Any help or reference is sincerely appreciated.

P.S.
In item2 I can display images on the terminal, but, when using w3m, still no images appear.


Solution 1:

w3m with inline images on macos

Things you need to make this happen on macos:

1. Terminal emulator that supports sixel

iTerm2 recently added sixel support for viewing inline images. You'l need iterm 3.3 or later, which at time of writing is in beta, available in the test releases section of the downloads page.

2. Utility for converting images to sixel format

I used img2sixel.

  git clone https://github.com/saitoha/libsixel # Download the source code
  pushd libsixel # switch to the directory containing the source
  ./configure # This generates compilation settings for your OS
  make # Compile the program
  export SIXEL_DIR=${PWD} # Store current directory for reference later

  # Test it
  ./converters/img2sixel images/snake.png #should display in your terminal :)

3. w3m build with sixel support

Follow the sixel readme in tats/w3m

  popd # Don't clone w3m within the img2sixel dir
  git clone https://github.com/tats/w3m
  pushd w3m
  ./configure --enable-image
  make

  # Test it 
  W3M_IMG2SIXEL="${SIXEL_DIR}/converters/img2sixel" ./w3m -sixel -o display_image=1 google.com

4. Install

If the above test worked, then the compiled img2sixel and w3m binaries can be copied into a dir referenced by $PATH, eg /usr/local/bin so you don't have to reference them explicitly each time you start w3m.