How does Omeka use original and fullsize images by default?

I’m looking for some clear documentation that explains how Omeka uses the original and fullsize images by default and if / how this can be changed. I’m struggling to find this.

It looks like Omeka is creating an originals folder with the original image in in, plus a fullsize folder with a copy that is smaller or the same size. When displaying images it is showing the original image.

If it is displaying the original image what is the purpose of the fullsize image?

Can I control which image it displays? And how please?

I am primarily concerned with server space, so I don’t really want two sets of images stored. I can’t find any clear docs on how all this is managed. Can you help please?

Best regards,

Mark

Omeka almost never actually uses the original in a page (unless it’s something where that’s how it has to work, like a video). When things like images are embedded on an item’s show page, we use the “fullsize” image there, as well as for certain places like “showcase” images in the exhibit builder. In general, the original file just gets linked to, not embedded on a page (so things like .tiff files can work more reliably, for example).

Are you sure you’re space constrained to such a degree that the fullsize images really matter? Like all Omeka’s generated thumbnails they’re .jpg files, so they’re generally quite small in the scheme of things.

Thanks for your reply jflatnes,

I’m using the “Thanks Roy” theme and I cannot see anywhere that the “fullsize” images are being used. The pages / items show the square thumbs, which is fine, but when you click on them the original linked images are shown. What I would like to happen is that the “fullsize” images are show instead. This way I would not need the originals and could remove them. This would save me a considerable amount of space because some of our volunteers have been scanning rather larger then necessary (which I will address with them separately).

I’d also like the option for the images to open in a new window instead of the current window but I can’t see how I can change this either.

I’m sure these requirements must be possible but have no idea how to do them and cannot find any documentation that explains how it would be done.

There are two ways Thanks Roy can show files on an item’s page, controlled by a setting in the theme’s configuration page (“Item File Gallery”). With the gallery enabled, the files are shown as a grid of square thumbnails, linking either to the file’s show page or to the original file. There’s no simple way of changing this function to link directly to the fullsize image instead (though you could switch it to linking to the file’s “show” page, which by default will embed the fullsize file).

The other way, with the gallery setting turned off, is direct display or embedding of the files. For images, this isn’t much of a difference: we still show thumbnails, just using a different function (files_for_item). For your purposes though, there’s an important difference: files_for_item allows you to easily tell it to link to the fullsize instead of the original by just adding an argument:

echo files_for_item(array('linkToFile' => 'fullsize'));

Another argument lets you easily have the links open in a new window or tab:

echo files_for_item(array(
    'linkToFile' => 'fullsize',
    'linkAttributes' => array('target' => '_blank'),
));

Thank you, that’s really helpful and given me several options to experiment with.

In the first para of your reply you say that with the gallery enabled I could switch to linking the thumbnails to the file’s “show” page. How would I do this please?

The function item_image_gallery is what’s used to make that gallery.

The third argument is what tells the function whether to link to the file directly or to use the files/show page, so you need to specify that argument (and therefore the two before it as well):

echo item_image_gallery(array(), 'square_thumbnail', true);

Thanks again for your advice!

I’ve been playing around with the theme and the suggestions you made. I’ve settled on using the gallery enabled and tweaking the item_image_gallery function as you suggested in your last post.

This is working exactly how I would like it except that on the show page the fullsize image is still providing a link to the original image. So if I click the fullsize image on the show page I go to the original.

If possible I would like to stop this link appearing, so it is not possible to click the link in the fullsize image.

This would enable me to manage without two copies of each image, one in fullsize and one in original folders.

Is it possible to do this please?

For that you want to edit the files/show.php file in the theme (following the same steps to copy it into the theme first if necessary). The file_markup function is the call you want to change, adding the option array('linkToFile' => false)

Apologies for my lack of understanding but I’m not clear where or how to insert the file_markup function into the theme.

I have enough knowledge to follow your instructions to mod the functions that are already in the theme but I don’t understand where to add new ones or the full code I need to use to do so. I’ve tried adding the file_markup myself and get an error when I visit the site.

I am now using the seasons theme. Would it be possible to explain the full code that I need to add to the show.php file for this please and where it should go?

<?php echo head(array('title' => metadata('item', array('Dublin Core', 'Title')),'bodyclass' => 'items show')); ?>

<h1><?php echo metadata('item', array('Dublin Core', 'Title')); ?></h1>

<div id="primary">

    <?php if ((get_theme_option('Item FileGallery') == 0) && metadata('item', 'has files')): ?>
    <?php echo files_for_item(array('imageSize' => 'fullsize')); ?>
    <?php endif; ?>
    
    <?php echo all_element_texts('item'); ?>
    
    <?php fire_plugin_hook('public_items_show', array('view' => $this, 'item' => $item)); ?>

</div><!-- end primary -->

<aside id="sidebar">

    <!-- The following returns all of the files associated with an item. -->
    <?php if ((get_theme_option('Item FileGallery') == 1) && metadata('item', 'has files')): ?>
    <div id="itemfiles" class="element">
        <h2><?php echo __('Files'); ?></h2>
        <?php echo item_image_gallery(array(), 'square_thumbnail', true); ?>
    </div>
    <?php endif; ?>

    <!-- If the item belongs to a collection, the following creates a link to that collection. -->
    <?php if (metadata('item', 'Collection Name')): ?>
    <div id="collection" class="element">
        <h2><?php echo __('Collection'); ?></h2>
        <div class="element-text"><p><?php echo link_to_collection_for_item(); ?></p></div>
    </div>
    <?php endif; ?>

    <!-- The following prints a list of all tags associated with the item -->
    <?php if (metadata('item', 'has tags')): ?>
    <div id="item-tags" class="element">
        <h2><?php echo __('Tags'); ?></h2>
        <div class="element-text"><?php echo tag_string('item'); ?></div>
    </div>
    <?php endif;?>

    <!-- The following prints a citation for this item. -->
    <div id="item-citation" class="element">
        <h2><?php echo __('Citation'); ?></h2>
        <div class="element-text"><?php echo metadata('item', 'citation', array('no_escape' => true)); ?></div>
    </div>

</aside>

<ul class="item-pagination navigation">
    <li id="previous-item" class="previous"><?php echo link_to_previous_item_show(); ?></li>
    <li id="next-item" class="next"><?php echo link_to_next_item_show(); ?></li>
</ul>

<?php echo foot(); ?>

Make sure you’re looking at the right file. Since you were talking about the file show page, that would be files/show.php, not items/show.php.

Sorry, I didn’t understand that you were talking about a different show.php file to the one we have discussed so far.

There is no “files” folder in any of the 3 themes I have installed (Berlin, Default [Thanks Roy] and Seasons). Do you mean I need to add a new folder “files” in the theme folder? And then add a new file called “show.php” in that folder? If this is correct can you advise me where to copy it from please?

There is another show.php file in application/views/scripts/files/ do I copy this one?

You mention the same steps as before but I’m not sure what steps you mean as I haven’t done this before.

Thanks for your patience!

Yes, you’d create a folder called “files” and copy the show.php from application/views/scripts/files.