I noticed that the galleria was not preloading the images and was creating the thumbs from large images. Following the instruction here ( http://github.com/aino/galleria/blob/master/docs/getting-started.rst ) I went ahead and created an image cache thumbnail which is linked to image (Content: Slideshow slideshow_thumbnail image linked to image). In the file views_slideshow_galleria.theme.inc I changed line 34 from $image = preg_replace('@img\s+@i', 'img longdesc="'. $url .'" ', $image); to $image = '<a href="' . $url . '">' . $image . '</a>'; . Now it only preloads the thumbnail images.

Also because the title attribute which the galleria plugin is using for the caption is associated with the imagecache thumbnail there might be some potential in using theme('imagecache', $preset, $image['filepath'], $alt, $title, $attributes); to add a more robust caption to the image before it is sent to the galleria plugin.

Or......... create a row style .tpl file for the view used with the thumbnail linked to image and erase everything except

<?php foreach ($fields as $id => $field): ?>
<?php print $field->content; ?>
<?php endforeach; ?>

and then in the views_slideshow_galleria.theme.inc file erase all the regex stuff so the first function is

function template_preprocess_views_slideshow_galleria(&$vars) {
  // Initialize our $images array.
  $vars['images'] = array();

  // Strip all images from the $rows created by the original view query.
  foreach($vars['rows'] as $item) {

      // Add the image to our image array to display.
      $vars['images'][] = $item;
  }

  $options = $vars['options']['views_slideshow_galleria'];

  _views_slideshow_galleria_add_js($options, 'views-slideshow-galleria-images-'. $vars['id']);
}

Comments

aaron’s picture

Status: Active » Fixed

I've implemented the first (sans the imagecache theme, as there's no guarantee that's how the view will be used). unfortunately, i don't believe that a style plugin can override the row style, so we can't do the more preferable version.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Serapio’s picture

Version: 6.x-1.x-dev » 6.x-1.0-beta3
Assigned: Unassigned » Serapio
Category: feature » bug
Priority: Normal » Major
Status: Closed (fixed) » Needs work

I still have this issue and it is very annoying as I am having a gallery with 100+ images.

Despite having set thumbnails to true and preload to 2, galleria keeps loading all images immediately and uses the large images as thumbnails.

So I guess this is not solved at all. If I am wrong some hints how to do it right would bei nice.