thumbnail profusion

  • Posts: 32
  • Thank you received: 1
  • Hikashop Business
12 years 5 months ago #32036

Since upgrading to 1.5.5 (from about 1.4.4), I have many new thumbnail directories in /media/hika_shop/uploads...


thumbnail_155x220
thumbnail_160x220
thumbnail_156x220
thumbnail_158x220
thumbnail_172x219
thumbnail_174x220
thumbnail_205x220
thumbnail_219x207
thumbnail_220x166
thumbnail_123x220

and on and on... one directory for every size of thumbnail that exists, I guess.

Is that okay? Was it done to avoid file handle limits when people change thumbnail sizes?

The images from thumbnail/ don't appear to be getting used... is it safe to delete them?

I found one broken image in the thumbanil_XXXxYYY directories. It was just data. Strings said GD library created it, so probably a bug in GD? I deleted it, and it regenerated fine.

So then I did:
file */*.jpg | grep -v JPEG and found one thumbnail that file thought was a minix v2 filesystem! Couldn't mount it, though (bad superblock) so am thinking that was a random wrinkle in the file's fabric. I deleted it, anyway.

The new version is phenomenal so far, especially in terms of the ease of upgrading.

Also, congrats on being now the top-rated Popular shopping cart on extensions.joomla.org. You deserve it!

-Henry

Please Log in or Create an account to join the conversation.

  • Posts: 81677
  • Thank you received: 13100
  • MODERATOR
12 years 5 months ago #32038

That's because you can now have different size of thumbnails for different listings on your website, so you will have different folders based on the size of the thumbnails generated.
The thumbnail folder is indeed not used anymore so you can remove it.
Anyway, you can remove all the thumbnail folders if you want and HikaShop will regenerate the thumbnails on the fly when needed.

Indeed, sometimes, the GD resizing might not work properly.

Thank you for your kind comments. If you want, you can post a review on the JED.

Please Log in or Create an account to join the conversation.

  • Posts: 32
  • Thank you received: 1
  • Hikashop Business
12 years 5 months ago #32364

uh-oh, an old issue may have resurfaced, in 1.5.5

when image_x and image_y are blank (in Configuration, Files | Image Width and Image Height are blank) then the watermark is not being made.

I looked at administrator/components/com_hikashop/helpers/image.php, and it looks like watermarking is done in the resizeImage function. Maybe that function is never getting called, when image_x and image_y are both empty?

Thank you in advance for any help solving...

Please Log in or Create an account to join the conversation.

  • Posts: 81677
  • Thank you received: 13100
  • MODERATOR
12 years 5 months ago #32365

Yes, that problem has already been found and fixed. Just download again the new version from our website and install it and that will fix the problem.

Please Log in or Create an account to join the conversation.

  • Posts: 32
  • Thank you received: 1
  • Hikashop Business
12 years 5 months ago #32370

apologies; I guess I did not search the forum enough before posting :blush:

I downloaded the new version, then changed

if(!$image_x && !$image_y){
to
if(!$image_x && !$image_y && empty($watermark_name)){

and all is well.

Please Log in or Create an account to join the conversation.

  • Posts: 43
  • Thank you received: 3
12 years 3 months ago #38414

Hi all, I do not know if this is a bug or I have not found a way to make it work correctly!

When I add more than one image to a product, the image sizes tend to use the size of the first inported image in that product.

Only the first product has the right proportion, all other images (and that is because they have not all the same size! which can happen I think) are changed to the size of this first one as a preview within the page.

When you click on it, the pop-ups work great for every individual image as they keep their original propotional settings.

as a demo I have a part of my product page showing the mutated preview and the correct popup. It is the last image of 6.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81677
  • Thank you received: 13100
  • MODERATOR
12 years 3 months ago #38516

It sounds like you have some CSS messing up with the image size.
Could you give a link to that page so that we can have a look at the CSS ?

Please Log in or Create an account to join the conversation.

  • Posts: 81677
  • Thank you received: 13100
  • MODERATOR
12 years 3 months ago #38657

Please add the line:
list($this->width, $this->height) = getimagesize($this->uploadFolder.$path);

before the line:
$html = $this->displayThumbnail($path,$alt,is_string($addpopup),$options, $module);

in the file administrator/components/com_hikashop/helpers/image.php and that should fix the problem.

The following user(s) said Thank You: uteco

Please Log in or Create an account to join the conversation.

  • Posts: 43
  • Thank you received: 3
12 years 3 months ago #38670

Thank you very much. That solved the problem.

Please Log in or Create an account to join the conversation.

Time to create page: 0.068 seconds
Powered by Kunena Forum