This example uses OpenLayers v10.9.0. The latest is v.
Edit

#### Image ArcGIS MapServer

arcgis 5 image 8 dynamiclayer 1

#####

Example of an image ArcGIS layer.

This example shows how to use a dynamic ArcGIS REST MapService. This source type supports Map and Image Services. For dyamic ArcGIS services.

##### main.js

    import Map from 'ol/Map.js';
    import View from 'ol/View.js';
    import ImageLayer from 'ol/layer/Image.js';
    import TileLayer from 'ol/layer/Tile.js';
    import ImageArcGISRest from 'ol/source/ImageArcGISRest.js';
    import OSM from 'ol/source/OSM.js';

    const url =
      'https://sampleserver6.arcgisonline.com/ArcGIS/rest/services/' +
      'USA/MapServer';

    const layers = [
      new TileLayer({
        source: new OSM(),
      }),
      new ImageLayer({
        source: new ImageArcGISRest({
          ratio: 1,
          params: {},
          url: url,
        }),
      }),
    ];
    const map = new Map({
      layers: layers,
      target: 'map',
      view: new View({
        center: [-10997148, 4569099],
        zoom: 4,
      }),
    });

##### index.html

    <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="UTF-8">
        <title>Image ArcGIS MapServer</title>
        <link rel="stylesheet" href="node_modules/ol/ol.css">
        <style>
          .map {
            width: 100%;
            height: 400px;
          }
        </style>
      </head>
      <body>
        <div id="map" class="map"></div>

        <script type="module" src="main.js"></script>
      </body>
    </html>

##### package.json

    {
      "name": "arcgis-image",
      "dependencies": {
        "ol": "10.9.0"
      },
      "devDependencies": {
        "vite": "^3.2.3"
      },
      "scripts": {
        "start": "vite",
        "build": "vite build"
      }
    }