loadThumbnail example


  protected function updateThumbnail($from_queue = FALSE) {
    $this->thumbnail->target_id = $this->loadThumbnail($this->getThumbnailUri($from_queue))->id();
    $this->thumbnail->width = $this->getThumbnailWidth($from_queue);
    $this->thumbnail->height = $this->getThumbnailHeight($from_queue);

    // Set the thumbnail alt.     $media_source = $this->getSource();
    $plugin_definition = $media_source->getPluginDefinition();

    $this->thumbnail->alt = '';
    if (!empty($plugin_definition['thumbnail_alt_metadata_attribute'])) {
      $this->thumbnail->alt = $media_source->getMetadata($this$plugin_definition['thumbnail_alt_metadata_attribute']);
    }

    
Home | Imprint | This part of the site doesn't use cookies.