Jump to content
FWR Media

KissIT Image Thumnailer

Recommended Posts

itemprop="image  links to the thumbnailed image.. any chance i can ge it to link to the main image..

 

Also can i increasse the compression on the images..

Edited by nafri

Share this post


Link to post
Share on other sites

@@vampirehunter,

 

newest version r14 includes watermark

Edited by raiwa

Share this post


Link to post
Share on other sites

Hi Guys,

 

Been running this contribution since it came out and it works great - thank you :)

 

However, when backing up my files I have noticed that the thumbs directories have become very bloated - with lots of thumbs where the products were deleted some time ago.

 

Is the best way to clear the thumbs just to delete them from the server and clear the cache? or is there a way built into the mod to do this??

 

Many Thanks


Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Share this post


Link to post
Share on other sites

Hello Heather @@Mort-lemur,

 

Obsolete thumbs need to be cleared by hand. The easiest way is to delete all thumbs and let them to be created again.

 

Kind regards

Rainer

Share this post


Link to post
Share on other sites

@@raiwa Thank you


Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Share this post


Link to post
Share on other sites

Suggestion for future:

 

PHP is horribly inefficient in creating thumbs, so there is a max filesize that can be handled.  While no one should be uploading 2MB photos, the code still should protect against this secenario.  Right now, if creating a thumbnail maxes out the memory limit it just crashes the page. 

 

Suggestion - limit filesize in tep_image, if too large escape to temp image.

 

if(!file_exists($src)){
$src = '/images/pending.gif';
} elseif (filesize($src) > 2000000){
$src = '/images/pending.gif';
}

Share this post


Link to post
Share on other sites

@@Mort-lemur

 

I went to update 14 to 15.  1 problem with "1a";  When I change the line (or remove the dot after $image) my "Carousel" banner stops working.  "1b" update seems to be fine.

 

Also step 2 instructions says to go to [catalog]/includes/product_info.php.  It should read [catalog]/product_info.php. 

Share this post


Link to post
Share on other sites

Hello Dean @@dculley,

 

Thank you for the report. Just uploaded r16 with your fixes.

 

regards

Rainer

Share this post


Link to post
Share on other sites

@@raiwa

updating from ancient version, now using latest version R16 for 2.3.4 standard I noticed a bug

 

in admin - configuration - images :  the "reset Thumbs" clears the thumbs directory at: catalog\includes\modules\kiss_image_thumbnailer\thumbs\...

 

R16 had me set up catalog\images\thumbs\...

which does not get cleared upon reset....

 

How would you suggest sorting that?

Edited by Roaddoctor

-Dave

Share this post


Link to post
Share on other sites

Hello David @@Roaddoctor,

 

There is no "reset Thumbs" included in the KissIT configuration setup neither any function included in the scripts to do so. Thumbs must be cleared by hand (delete them).

May be you have these setting there from a different thumbmail add-on.

 

regards

Rainer

Share this post


Link to post
Share on other sites

Hello David @@Roaddoctor,

 

Didn't know this post, I'll have a look and maybe add it.

The Thumb directory is defined in the tep_image function:

                                      'thumbs_dir_path'       => DIR_WS_IMAGES . 'thumbs/',

So the thumb directory in Gelgely's function should be softcoded.

 

Thanks' for the push and

kind regards

Rainer

Share this post


Link to post
Share on other sites

working fine in concept

run sql

INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES
('Reset thumbs', 'RESET_IMAGE_THUMBS', 'false', 'Reset thumbs cache', 4, 9, '2013-02-20 19:36:26', '2013-01-29 17:11:10', 'tep_cfg_reset_thumbs_cache', 'tep_cfg_select_option(array(''reset'', ''false''),');

add to admin/includes/functions/general.php

// Function to reset KISSit image thumbs cache entries
// Gergely Toth
  function tep_cfg_reset_thumbs_cache( $action = 'false' ) {
        if ($action == 'reset' ) {
          $mask = "../images/thumbs/*.jpg";
          array_map( "unlink", glob( $mask ) );
          $mask = "../images/thumbs/*.gif";
          array_map( "unlink", glob( $mask ) );
          $mask = "../images/thumbs/*.png";
          array_map( "unlink", glob( $mask ) );
          tep_db_query( "UPDATE " . TABLE_CONFIGURATION . " SET configuration_value='false' WHERE configuration_key='RESET_IMAGE_THUMBS'" );
        }
  }

Edited by Roaddoctor

-Dave

Share this post


Link to post
Share on other sites

Hello David @@Roaddoctor,

 

Just uploaded r17 which includes the cache reset. (No softcode for the directory possible, needs to be hardcoded like you posted :) )

 

regards

Rainer

Share this post


Link to post
Share on other sites

@@raiwa

Hello!

I have latest update of KissIT. 

I checked installation, reinsalled the addon step by step few times. 

there is a problem that not all product photos are thumbnailed and product listing page doesnt looks well (some image are smaller, but some - larger..)...

Yoy can see live example here:

http://vaciesuuznemums.lv/aaaa/ieksdurvis-c-23.html

 

 

"<img src="images/koka_durvis_pildini_8a.JPG" alt="Beicētas Iekšdurvis (Osis)" title="Beicētas Iekšdurvis (Osis)" width="210" height="210" class="img-responsive">"

 

and working example:

<img width="210" height="210" src="images/thumbs/210x210_ieksdurvis_finieretas_amazaque.JPG" title="Iekšdurvis (Amazaque)" alt="Iekšdurvis (Amazaque)" class=" img-responsive thumbnail group list-group-image">

 

what should I do and how to fix that?

Edited by gvv

Share this post


Link to post
Share on other sites

Hello @@gvv,

 

Please check if you have image width AND height specified in:

Admin => Configuration => Images => Small Image, Heading Image and Subcategory Image

 

Then the smaller images are smaller than the requested image size, so KissIT puts them in the original size over a white background area which has the requested image size.

if you wish to upsize the images which are smaller than the requested size, switch "KissIT Disable Image Upsize" to "false".

But this can produce "unsharp, pixelised" images, it would be better to use images with at least the requested image size.

Please see also the info in the instructions:

Configuration Settings in Admin

 

regards

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

Why could it be that thumbnails are generated anew on each visit despite the fact that all of them already exist in the respective directory on the server, i.e. they have already been generated once? Minimum image values are correctly set up in the configuration panel.

 

Also, where can the new releases be fetched from? The contribution page lists only one link to r9.

Share this post


Link to post
Share on other sites

Hello @,

 

New versions download:

http://addons.oscommerce.com/info/9206

 

Please check again for the problem you reported once you have updated to the newest version.

 

regards

Rainer

Share this post


Link to post
Share on other sites

Thanks Rainer. The update seems to have fixed the thumb generation found in category listings. However, the thumbs (main and extra) on product pages still keep on being generated again and again with each visit. Does the add-on cover the thumb behaviour on detailed product pages? Currently, it takes ages to fully load a product page with say five 600+ KB images as ~3MB of data have to be loaded first before being resized.

Share this post


Link to post
Share on other sites

Hello @,

 

I'm not sure now what you mean with "the thumbs (main and extra) on product pages still keep on being generated again and again with each visit."

 

This has no logic explication, or they are generated again everywhere or nowhere. What makes you think that they are generated again??

Then if you have no thumbs on the product page, how can they be generated again and again??

 

For to get thumbs on the product page you need to apply the modifications explained in the docs: "*product_info"  if your store is 2.3

 

See installation (osc standard):

osCommerce version 2.2.rc2a doesn’t need additional modification for product image in product_info.php

osCommerce version 2.3.0 – 2.3.3.4. needs additional modifications for product images in product_info.php:

Thumbnailing images in product pages ( bx gallery ) Ctrl+click

osCommerce version 2.3.4. standard needs additional modifications for product images in product_info.php:

Thumbnailing images in product pages ( Colorbox ) Ctrl+click

 

regards

Rainer

Share this post


Link to post
Share on other sites

@@Rainer

 

Hey there.  I was just testing out adding a class to an image that does not have width or height and noticed that the below line does not pass the info to the legacy tep_image.  This is 3 lines down from function tep_image

 

    if ( !is_numeric ( $width ) || !is_numeric ( $height ) ) return tep_image_legacy( $src, $alt, $width, $height, $parameters);
 

suggested

 

    if ( !is_numeric ( $width ) || !is_numeric ( $height ) ) return tep_image_legacy( $src, $alt, $width, $height, $parameters, $responsive, $bootstrap_css );
 

Share this post


Link to post
Share on other sites

Hello @@marcello,

 

Yes Sir, good point. I'll update it ASAP.

 

Thank you and kind regards

Raine

Share this post


Link to post
Share on other sites

@@marcello,

 

Just uploaded the update with your fix, thanks again

Share this post


Link to post
Share on other sites

Hello @@marcello, @@vampirehunter, @@Mort-lemur, @@greasemonkey and others,
 
I found a way to apply watermarks to the big product images used in the color box pop up on the product info page.

I also added the alt and title tag for the big images with the product name plus pi image number.
Here the modifications if you wish to give it a try before I upload the update:
 
In product_info.php lines 125+126 and lines 137+140 are changed.
 
In includes/modules/kiss_iomage_thumbnailes/classes/Image_Helper.php lines 78-84 are changed.

It is modified to force thumbnail generation even if the required image size is equal to the original image size if watermark is set bigger than zero.

 

Please see attached files.
 
Let me know what you think.
 
Thank you and kindest regards
Rainer

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×