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.

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

  • 1
    Not an answer because it doesn't use w3m, but browsh, will attempt to render images using text so doesn't require quite so much terminal config. It does use headless firefox for rendering, so not a lightweight solution. brow.sh Nov 25 '20 at 10:11

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

  # 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.

  • Thanks for the detailed answer. It will be of use when I want to use w3m again.
    – awllower
    Jun 28 '19 at 13:21
  • should be "pushd w3m" Jun 29 '19 at 13:17
  • Good spot @MartinPham, fixed. Jun 30 '19 at 21:13
  • 2
    In ubuntu, now you can just use sudo apt install w3m-img
    – ton
    Sep 16 '20 at 22:26
  • 1
    Thank you! For me though, on Mac Catalina 10.15.6, step 3 > configure should be changed to ./configure --enable-image --with-imagelib=imlib2. Then it worked. Oct 24 '20 at 23:08

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .