How to get the handle name of retina custom thumbnail?

Permalink
1) I create thumbnail named: medium (600px W)

2) The system create for me medium retina (1200px).

Now i also want to use medium retina (I dont see this under thumbnail on dashboard). So what is the handle.
i try: medium_2x (wont work).

siton
 
jordif replied on at Permalink Best Answer Reply
jordif
Hi,

where are you using the handle?

If you are using getBaseVersion() to retrieve the thumbnail, try using getDoubledVersion() to get the retina version (with the same handle).

hope this helps!

Jordi
siton replied on at Permalink Reply
siton
Thanks! for future searches about this topic. I use retina and medium (or small depend of the design) for lightbox image gallery (Classic structure - thumbnails + href to open bigger pic in lightbox mode). Works well + Google speed insight good score (Use the correct image sizes).
+ option to crop thumbs like i want.

Like this: http://photoswipe.com/
Or: http://getuikit.com/docs/lightbox.html...

<?php
....some loop......
//prefare values
$thumbTypeHandle = 'medium_width'; //some thumb type i created
$type = \Concrete\Core\File\Image\Thumbnail\Type\Type::getByHandle($thumbTypeHandle);
$src_small = $fileObj->getThumbnailURL($type->getBaseVersion());
$src_large = $fileObj->getThumbnailURL($type->getDoubledVersion());
?>
<!-- The lightbox markup -->
<figure>
    <a class="large-image" href="<?php echo $src_large ?>">
        <img class="small-image" src="<?php echo $src_src_small ?>" alt="Image description" />
    </a>
    <figcaption>Long image description</figcaption>
</figure>


This is the C5 docs about this issue:
http://documentation.concrete5.org/developers/working-with-files-an...