getImageTag example

'id' => 'image_scale',
      'data' => [
        'width' => 120,
        'height' => 90,
        'upscale' => TRUE,
      ],
      'weight' => 0,
    ];

    $style->addImageEffect($effect);
    $style->save();
    $this->assertEquals('<img src="' . $url . '" width="120" height="60" alt="" loading="lazy" />', $this->getImageTag($variables));
    $this->assertFileDoesNotExist($generated_uri);
    $this->drupalGet($this->getAbsoluteUrl($url));
    $this->assertSession()->statusCodeEquals(200);
    $this->assertFileExists($generated_uri);
    $image_file = $image_factory->get($generated_uri);
    $this->assertEquals(120, $image_file->getWidth());
    $this->assertEquals(60, $image_file->getHeight());

    // Rotate 90 degrees anticlockwise.     $effect = [
      'id' => 'image_rotate',
      
Home | Imprint | This part of the site doesn't use cookies.