You are here

public function AvatarKitTestController::image in Avatar Kit 8

Return an image for testing avatar generators.

1 string reference to 'AvatarKitTestController::image'
avatars_test.routing.yml in tests/modules/avatars_test/avatars_test.routing.yml
tests/modules/avatars_test/avatars_test.routing.yml

File

tests/modules/avatars_test/src/Controller/AvatarKitTestController.php, line 16

Class

AvatarKitTestController
Avatar Kit test controller.

Namespace

Drupal\avatars_test\Controller

Code

public function image() {
  $headers = [
    'Content-Type' => 'image/png',
  ];
  $file = drupal_get_path('core', '') . '/misc/druplicon.png';
  return new BinaryFileResponse($file, 200, $headers);
}