ImageObject doesn't output because the file name has Url encoded.

This problem occurs when you use the URL encoding target character as the image file name.

The argument $content_image_uri of the function getImageInformation() needs to pass the original file name that is not URL-encoded.
This is because it is necessary to pass the original filename to the function parseFile in the GDToolkit class which will eventually be executed to obtain image information.

#GDToolkit.php
  public function parseFile() {
    $data = @getimagesize($this->getSource());
    if ($data && in_array($data[2], static::supportedTypes())) {
      $this->setType($data[2]);
      $this->preLoadInfo = $data;
      return TRUE;
    }
    return FALSE;
  }
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Tomotsugu Kaneko created an issue. See original summary.

Tomotsugu Kaneko’s picture

Tomotsugu Kaneko’s picture

Issue summary: View changes
Tomotsugu Kaneko’s picture

Version: 8.x-1.0 » 8.x-1.x-dev
Status: Active » Needs review
KarenS’s picture

Status: Needs review » Fixed

See the new 8.2 branch, which uses the Schema.org Metatag module. That module handles images correctly.

KarenS’s picture

Status: Fixed » Closed (won't fix)