ModernZ Image Viewer

April 2, 2026 ยท View on GitHub

A minimal layout is automatically applied when viewing images while using ModernZ osc, which also features zoom controls.

image_mode_modernz

Zoom Controls

Below is a list that explains the zoom control functions depending on how you interact with them.

ActionFunction
Left mouse clickZoom in/out of image
Right mouse clickReset zoom level to normal
Mouse WheelZoom in/out of image

The following options will help you enhance and automate your image viewing experience with mpv. Feel free to adjust them to your liking or use case.

Reset values per viewed file, should be added in top level within mpv.conf:

reset-on-next-file=video-zoom,panscan,video-unscaled,video-rotate,video-align-x,video-align-y

Auto profiles that apply useful mpv options and ModernZ options when viewing images:

[Video]
    profile-cond=p["current-tracks/video"] and not p["current-tracks/video"].image
    profile-restore=copy-equal
    input-commands=disable-section image
    taskbar-progress=yes

[Image]
    profile-desc=ModernZ osc Image Viewer mode
    profile-cond=p["current-tracks/video"] and p["current-tracks/video"].image and not p["current-tracks/video"].albumart
    profile-restore=copy-equal
    video-recenter=yes
    taskbar-progress=no
    stop-screensaver=no
    prefetch-playlist=yes
    video-aspect-override=no
    image-display-duration=inf
    title=${media-title} [${?width:${width}x${height}}]
    input-commands=enable-section image allow-hide-cursor
    script-opts-append=modernz-osc_fade_strength=50
    script-opts-append=modernz-show_window_title=yes

In your input.conf, add: (adjust keybinds to what suits you)

# Image viewer binds
WHEEL_UP         {image} script-binding positioning/cursor-centric-zoom  0.1
WHEEL_DOWN       {image} script-binding positioning/cursor-centric-zoom -0.1
0                {image} no-osd set video-align-y 0; no-osd set video-align-x 0

Useful

If you want to extend functionality even further to turn mpv into a full fledged image viewer, we recommend the following Github repository:

It allows you to have options such as:

  • Cursor centeric zoom with scroll wheel
  • Pan image, drag to pan and use gestures
  • Double page mode (ie: manga)