private @NotNull Consumer<View> createHtmlImageViewHandler() {
    return view -> {
      float width = view.getPreferredSpan(View.X_AXIS);
      if (width < 0 || width > myBottomScrollPane.getWidth()) {
        myBottomScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
      }
    };
  }
private @NotNull Consumer<View> createHtmlImageViewHandler()