mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
29 lines
688 B
PHP
29 lines
688 B
PHP
<?php
|
|
/**
|
|
* @package Grav.Common.Page
|
|
*
|
|
* @copyright Copyright (C) 2015 - 2018 Trilby Media, LLC. All rights reserved.
|
|
* @license MIT License; see LICENSE file for details.
|
|
*/
|
|
|
|
namespace Grav\Common\Page\Medium;
|
|
|
|
class StaticImageMedium extends Medium
|
|
{
|
|
use StaticResizeTrait;
|
|
|
|
/**
|
|
* Parsedown element for source display mode
|
|
*
|
|
* @param array $attributes
|
|
* @param boolean $reset
|
|
* @return array
|
|
*/
|
|
protected function sourceParsedownElement(array $attributes, $reset = true)
|
|
{
|
|
empty($attributes['src']) && $attributes['src'] = $this->url($reset);
|
|
|
|
return [ 'name' => 'img', 'attributes' => $attributes ];
|
|
}
|
|
}
|