Product Image Limitations?

  • Posts: 112
  • Thank you received: 1
8 years 1 month ago #250007

-- HikaShop version -- : 3.6.1
-- HikaMarket version -- : 1.7.1
-- Joomla version -- : 3.6.2

Hi,

Is there a "file size" limit setting for the images somewhere in Hikashop? :unsure:

The reason I ask if that a vendor using Hikamarket uploads a number of images for a product, and one of them happens to be a larger file size (expecting it will be resized) of approx greater than 300mb, then the image thumbnail doesn't load and NO images appear at all on the product listing! Remove the thumbnail of the larger file from the product, and images start to appear again on the front end.

See attachments.

Where can I control the file size or am I doing something wrong? The expectation is that the images will be resized to the two sizes specified in configuration > images, regardless of the incoming file size.

Thx, Darrell

Attachments:

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

  • Posts: 26146
  • Thank you received: 4026
  • MODERATOR
8 years 1 month ago #250034

Hi,

There is no file size limitation for the moment, but !

In HikaShop configuration, you have a product image width/height which will define the maximum image sizes. If an image is bigger than the restriction, the image will be automatically reduced.
www.hikashop.com/support/documentation/5...fig.html#main_images

In HikaMarket you have various restrictions (HikaMarket > Accesses > Vendor Options) and we have in the TODO list new limitations for the "file size" (images or uploads).

For the moment you can edit the core file "components/com_hikamarket/controllers/upload.php" and replace the line

$max_height = (int)$config->get('max_image_size_height', 0);
By
$max_height = (int)$config->get('max_image_size_height', 0);

$options['max_file_size'] = 1048576; // 1MB
So you will enable the file size limitation in the HikaMarket upload system.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 112
  • Thank you received: 1
8 years 1 month ago #250039

Hi,

Thanks for the quick reply. Perhaps I didn't explain this well.

Having a file size limitation is a good feature, but I just need to know why when a larger image is imported (of less than 1mb) the image thumbnail doesn't load and it stops all images from showing for that product on the front-end.

Thx, Darrell

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

  • Posts: 26146
  • Thank you received: 4026
  • MODERATOR
8 years 1 month ago #250056

Hi,

I am afraid that I still don't understand your question and your issue.
I don't see why it will stop to show all images ; but it can have problem to generate some thumbnails and if there are some memory limitation, the generation of the thumbnail can through a PHP Fatal error or HikaShop can avoid the image if he detect that the file is too big to feet in the allowed memory.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 112
  • Thank you received: 1
8 years 1 month ago #250108

Figured this one.

Although we could open the image to view it, we couldn't open it in photoshop. It was corrupt.

This was causing the upload to fail.

Thx, Darrell

p.s. when this happens, it does stop all the images from that product from showing.

Last edit: 8 years 1 month ago by darrelluk.

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

  • Posts: 26146
  • Thank you received: 4026
  • MODERATOR
8 years 1 month ago #250124

Hi,

I am sorry but it is not possible to understand the issue you are facing.
You started the thread talking about a limitation for the file size and now you're talking about some problem with the display of images.
Knowing that the thumbnail generation is a function of the HikaShop core ; I don't understand your message or your explanations.

Now I invite you to perform some test in the HikaShop backend to check if you have a similar problem or not.
If you have the same problem : please create a new post in the HikaShop section of that forum.
If you do not have the same problem : please create a new post in HikaMarket with clear explanations to understand / see and reproduce the issue.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
8 years 3 weeks ago #251461

We may have a similar issue with HikaMarket. We're getting an error on the frontend. See attachment.

The images mentioned in the error are actually small and the memory limit set in PHP is more than adequate to resize them - 128M. One image in particular is only 100px x 104px and only needs to be sized down to 100px x 100px.


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Attachments:
Last edit: 8 years 3 weeks ago by 3by400.

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

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
8 years 3 weeks ago #251463

Also, I should mention ... the error only displays on vendor detail pages. The same images resize just fine on the vendor listing page and on product pages.

Fine - igenerac.com/shop/shop-installers
Fine - igenerac.com/shop-installer-products/pro...ervice-within-1-hour
Error - igenerac.com/shop/shop-installers/vendor...7-the-generator-guys

The images in the error include the vendor's logo and the default Hikashop product image. I'm not sure why the default product image would be trying to load on the page with the error because the vendor's products have their own custom images.


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Last edit: 8 years 3 weeks ago by 3by400.

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

  • Posts: 26146
  • Thank you received: 4026
  • MODERATOR
8 years 3 weeks ago #251464

Hi,

Can you please check the image "generator_guys_white.jpg" which should be the vendor image ?
HikaMarket is using the HikaShop image helper to generate the thumbnail and there are some checks in that helper in order to avoid the memory limit issue ; the helper determine the required memory to handle the file and if there is not enough memory to handle it, it displays the warning instead of causing a PHP fatal error.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
8 years 3 weeks ago #251693

What do you want me to check about regarding the image? Its the same image displayed on the "Shop Installers" page at the link I previously provided. Here's the direct link to the image shown on the installers page - igenerac.com/media/com_hikashop/upload/t...rator_guys_white.jpg


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters

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

  • Posts: 26146
  • Thank you received: 4026
  • MODERATOR
8 years 3 weeks ago #251705

Hi,

The original image is (the link you gave was already a thumbnail) :
igenerac.com/media/com_hikashop/upload/t...rator_guys_white.jpg

The point that I don't understand why you have that issue.
Like I wrote ; there is nothing related to HIkaMarket (even if you are in the vendor page) but it is related to the HikaShop Image Helper.
In that file you will find a line

$estimation = (($origin->width * $origin->height) + ($e_x * $e_y)) * 8;
And if you replace the line just below
$app->enqueueMessage(JText::sprintf('WARNING_IMAGE_TOO_BIG_FOR_MEMORY', $filename));
By
$app->enqueueMessage(JText::sprintf('WARNING_IMAGE_TOO_BIG_FOR_MEMORY', $filename) . ' [' . $estimation . ' / ' . $rest . ']');
It should display the memory estimation and the free memory.
Using that information you should have more elements to understand why this message is displayed.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
8 years 3 weeks ago #251782

This is actually the original image - igenerac.com/media/com_hikashop/upload/generator_guys_white.jpg

I'll try your test, but I'm still not understanding why the other pages would have no issue resizing the same image as needed, but the vendor page does. Its a small original image.


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters

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

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
8 years 3 weeks ago #251785

This is the message I get. It makes no sense for that amount of memory to resize such a small image, and the same images are being resized just fine on the vendors listing page and many more other images are also being resized on that page.

Warning ! The image generator_guys_white.jpg is too big to be processed because of the memory limitation on your server. Either use a smaller image or increase the memory_limit parameter of the php.ini of your server. [2344481808 / 127910056]
Warning ! The image img_0091_100x104.jpg is too big to be processed because of the memory limitation on your server. Either use a smaller image or increase the memory_limit parameter of the php.ini of your server. [769126288 / 127908648]

I've commented out the message altogether for now so its not shown to visitors.


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Last edit: 8 years 3 weeks ago by 3by400.

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

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
8 years 3 weeks ago #251787

It looks like the problem is the size HikaMarket is trying to scale the images up to ...

Warning ! The image generator_guys_white.jpg is too big to be processed because of the memory limitation on your server. Either use a smaller image or increase the memory_limit parameter of the php.ini of your server. [2344481808 / 127910072 / Original Width:381/ Original Height:130/ Resize Scale: 29304x9999]


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Last edit: 8 years 3 weeks ago by 3by400.

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

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
8 years 3 weeks ago #251789

Interesting. It appears this was caused by the vendor image sizes being blank in the HikaMarket config. So, if those fields are blank, the default image size on the vendor page is apparently 29304 x 9999, however, the images on the vendors listing page do not go by the vendor image sizes in the HikaMarket config.


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
The following user(s) said Thank You: darrelluk

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

  • Posts: 26146
  • Thank you received: 4026
  • MODERATOR
8 years 3 weeks ago #251792

Hi,

Just to be sure ; what are your parameters for the HikaMarket vendor image (width, height, force size) ?
And what are your image settings for HikaShop ?

$estimation = (($origin->width * $origin->height) + ($e_x * $e_y)) * 8;
The default value for the vendor image size can read the HikaShop product image size if empty.
And if you force the size with a very height value.. It is logical that it will require a high quantity of memory.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
8 years 2 weeks ago #252088

HikaMarket - Width 150px Height 150px and "No" to "force size". The dimensions were blank when I was getting the error message.

HikaShop - 100 x 100


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters

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

  • Posts: 136
  • Thank you received: 7
7 years 8 months ago #261384

Jerome wrote: In HikaMarket you have various restrictions (HikaMarket > Accesses > Vendor Options) and we have in the TODO list new limitations for the "file size" (images or uploads).

$max_height = (int)$config->get('max_image_size_height', 0);
Regards,

I will suggest in your TODO to add $min_height and $min_widht too on images, so that you can control and restrict users to upload an image of a minimum height and width. E.g. if you would like the user to upload a product image of minimum 500px X 500px.


.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building

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

  • Posts: 26146
  • Thank you received: 4026
  • MODERATOR
7 years 8 months ago #261392

Hi,

Okay.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Moderators: Obsidev
Time to create page: 0.118 seconds
Powered by Kunena Forum