     anchor = @mget('anchor') or "top_left"
     [sx, sy] = @_final_sx_sy(anchor, sx[i], sy[i], sw[i], sh[i])
 
+    ctx.save()
     if angle[i]
       ctx.translate(sx, sy)
       ctx.rotate(angle[i])

          return () =>
            @loaded[i] = true
            image[i] = img
            ctx.save()
            ctx.beginPath()
            # TODO should take the real axis rule width into account, for now shrink region by 1 px
            frame = @renderer.plot_view.frame
            # use bottom here because frame is view coords
            ctx.rect(
              frame.get('left')+1, frame.get('bottom')+1,
              frame.get('width')-2, frame.get('height')-2,
            )
            ctx.clip()
            @_render_image(ctx, i, image[i], sx, sy, sw, sh, angle)
            ctx.restore()

        img.src = url[i]
        need_load[i] = false

      ctx.translate(-sx, -sy)
    else
      ctx.drawImage(image, sx, sy, sw[i], sh[i])
    ctx.restore()

class ImageURL extends Glyph.Model
  default_view: ImageURLView
