<commit_before><?php
namespace Chamilo\Core\Repository\ContentObject\File\Implementation\Rendition\Html\Type;

use Chamilo\Core\Repository\ContentObject\File\Implementation\Rendition\Html\HtmlInlineRenditionImplementation;

class HtmlInlineImageRenditionImplementation extends HtmlInlineRenditionImplementation
{

    public function render($parameters)
    {
        $object = $this->get_content_object();
        $name = $object->get_filename();

        $url = \Chamilo\Core\Repository\Manager :: get_document_downloader_url(
            $object->get_id(),<commit_msg>Fix: Only show certain image types inline<commit_after><?php
namespace Chamilo\Core\Repository\ContentObject\File\Implementation\Rendition\Html\Type;

use Chamilo\Core\Repository\ContentObject\File\Implementation\Rendition\Html\HtmlInlineRenditionImplementation;

class HtmlInlineImageRenditionImplementation extends HtmlInlineRenditionImplementation
{

    public function render($parameters)
    {
        $object = $this->get_content_object();

        if (! in_array($object->get_extension(), array('jpg', 'jpeg', 'gif', 'png', 'svg', 'bmp')))
        {
            $rendition = new HtmlInlineDefaultRenditionImplementation($this->get_context(), $this->get_content_object());
            return $rendition->render($parameters);
        }

        $name = $object->get_filename();

        $url = \Chamilo\Core\Repository\Manager :: get_document_downloader_url(
            $object->get_id(),
{'fraction_non_alphanumeric': 0.11869031377899045, 'fraction_numerical': 0.0, 'mean_word_length': 4.413284132841328, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3757461', 'n_tokens_mistral': 412, 'n_tokens_neox': 424, 'n_words': 59}