ImageExt aka Image

Hi,
I released a new version (0.9) of my image extension for kirby. It is a complete new rewritten plugin.
I action can you see it on my private webpage.

Main new changes/features:

  • Complete new written (integrate support for complex image tags like picture)
  • New project structure for easier integration and update via git
  • Default tags are imageext and imageext_gallery, but you can reactivate the support for the other tags (kirby.extension.imageext.support.tag.image, kirby.extension.imageext.support.tag.image_gallery)
  • Attribute resize is deprecated (currently it is working), please use in the future mode.
  • Add new Filter (brightness, contrast, colorize, edges, emboss, invert, opacity, sepia, sketch, smooth, pixelate)
  • Add new config parameter for gallery and Javascript zoom libraries
  • Add image profile support
  • ImageExt::getThumb method
  • Currently only support for GD-Library is included. ImageMagick support will come in a later release.

TODOs:

  • Add water stamp support (kirby.extension.imageext.watermark) or you can use the overlay filter (overlay) to overlay the image with a other image
  • Add ImageMagick support
  • Upscale support
  • Reactivate the support for caption field as image title
  • Default profile parameter kirby.extension.imageext.default_profile
  • Documentation …

Update (2015/05/30):

  • Upscale function now working
  • Bugfix: You can run blur more then one times

Version 0.9.1 is online

  • Moved documentation from GitHub wiki to README.md
  • Moved Changelog from README.md to CHANGELOG.md
  • Bugfix: #8 ImageExt create on every request for a image, a new image
  • Support javascript zoom gallery feature
  • Simple gallery tag is back
  • ImageExt::getThumb method added

Very nice! I am just starting to implement my website with Kirby. It would be nice to have the water mark (“water stamp”) function working.
I see your watermark is placed only at the bottom. I used to have it placed in the middle over the whole picture and then 50% opaque - looks horrible, but really keeps away the copy cats.
Anything like this planned in the near future?

M.

This watermark is manuell set by lightroom. It is not the solution what I like to implement via this plugin. But at the moment I am working on the google maps plugin (next days). After that I will work on the next feature of the image plugin (watermark, or a other feature of my todo list)

The watermark should support opaque, but there a some problems with the GD. GD only support opque on the easy way for png, not for jpeg. I have an idea how I make it also for jpeg. But we will see it in the next weeks (Beware this plugins are free time projects).

When the watermark is finished, it should be possible to set it on any position you like over the image (top-left, top-right, or per pixel, …)

When you have any ideas for future function. Please post it here or better on GitHub.

I posted some ideas for the position of the watermark.

A other feature what is important (I think so), is to add a other thumbnail of the same image as image target.

Example:
One profile for the thumbnail and the second profile for the link target with watermark.

It would be nice to have a central place where to configure what the watermark on your kirby site will look like for all (default) images. That way all pictures on your site are protected. You should be able to overwrite the default where necessary.
The transparency of the watermark isn’t that important. You can also use a grey font type color and use thin letters as a work arround.

The central place for the configuration are the profile feature of the ImageExt plugin. A missing part is (like I wrote in my previous post) link target profile.
In the first step, I will only support image watermarks.

1.0.0

  • Figure caption, link title, img title, img alt can have a field of file or page as source. {file-field} as content to the attributes. In the next release it will be possible to use {page-field} and the placeholder will be usable with static text.
  • Add support for gallery and image snippet. Example snippet are in the subdirectory of this plugin.
  • Add licence file

INFO:
Don’t forget to update the webhelper plugin.

Hi, I’m building my first kirby page & wanted to use your plugin for creating galleries in blog posts, but being the basic kind of user I am, I have a couple of questions.

  1. The plugin is not working just after installation, so I assume I need to write the setup into config.php like this
    c::set('kirby.extension.imageext.support.tag.image_gallery', true);
    etc, or is there a better way?

  2. When I try to use the gallery, it seems to be looking for images in the thumbs folder, is there a way to change that?

Thank you for the plugin, any guidance will be very much appreciated!

  1. Per default only the imagext_gallery and imagext tags are active. When you add c::set('kirby.extension.imageext.support.tag.image_gallery', true); or c::set('kirby.extension.imageext.support.tag.image', true); to your config.php, you can activate the image_gallery and image tag support.
  2. Yes, it is using the same function for thumbs like the normal image tag. So when no thumb for the image exist, then the plugin create the thumb and save it in the thumb directory. So for the next time, the plugin don’t need to recreate the thumbnail. You can change the thumb directory (for kirby) over the site.php file. -> customizing folder setup

I hope, I correctly answered your questions.

Hello,
Thank you for getting back to me, I really appreciate!
I’m still having problems re: 2. The image_gallery tag is now activated, but when I put this in my .txt:
(image_gallery: bike.jpg, camera.jpg, gadget.jpg)

the output is:


the two latter images define its path as ‘/thumbs’

I double checked the file names, any idea what might be going wrong?

Hi,
try to remove the blanks from the picture listing:
(image_gallery: bike.jpg,camera.jpg,gadget.jpg)

@lemoni, @abroess: Thanks for the hint. I opened a issue on GitHub for this problem (blanks on a image list).

EDIT: I corrected the issue on Github.

1 Like

I would suggest 2 improvements:

  1. Resize method as option for the config.php (resize, crop, none)
  2. Option thumbnail/link combination for an single image without using the image_gallery tag (Useful for a Lightbox)

@abroess
Thanks for your ideas.

What did you mean exactly with “Resize method as option for the config.php (resize, crop, none)”. You are right, there is no general option for “resize” method. But you can use the “kirby.extension.imageext.profiles” to define a own default profile and set this profile as default.
Example: https://www.fanninger.at/thomas/works/kirbycms-extension-image -> Search for Profiles

$imgeext_profiles['default']['mode'] = 'resize';
$imgeext_profiles['default']['image_width'] = 200;
c::set('kirby.extension.imageext.profiles', $imgeext_profiles);
c::set('kirby.extension.imageext.default_profile', 'default');

You can use the same function already for the simple image. (Not tested)

(image: dsc00439.png mode: crop width: 200 height: 200 link_url: http://www.google.at gallery: 1)

But you are right. A more clean solution would be nice. I am currently working on a new version with new features, I will also add you ideas into it.

Ops, i thought the profiles are still on the ToDo List (Readme on github) :wink:

Thanks for the input about the single image. But the link_url must be the link to the full resolution image. Certainly I can care for the link manual, but I would prefer the same automatic way as from the image_gallery:

<a href="Link to the image" class="image-link"> <img src="Link to the thumbnail" class="image"> </a>

You are right, I should update the README.md file. With the next release (I hope I can finish it in the next two weeks), docs will also be updated.

hello

great plugin. thanks!

is it possible to set the kirby.extension.imageext.gallery.class in a profile instead for all galleries?

best regards

andi

1 Like

I don’t have test it, but I also add a kirby tag parameter gallery_class for defining the Gallery-Class via kirby-tag.

Example for profile default.:

$imgeext_profiles['default']['mode'] = 'resize';
$imgeext_profiles['default']['image_width'] = 200;
$imgeext_profiles['default']['gallery_class'] = 'blabla';

good morning

it work perfekt. thank you very much and have a nice week.

andi