Enforce Specific Image Resolution for Upload

  • Posts: 127
  • Thank you received: 8
7 months 4 weeks ago #298383

Hi,

We have a client with a multi vendor site and would love the option to be able to enforce a specific image resolution when uploading a product image in the front end editor. I know its currently possible to force hikashop to resize or crop images to a specific resolution but this can lead to inconsistencies throughout the site i.e pixelation, white space etc and depends on the size of the original image. We would prefer vendors to resize their images correctly before uploading and enforce this rule by not allowing images to be uploaded unless they meet a specified size criteria.

Otherwise if there is a view or helper file override that can achieve the above we would appreciate any help to setup

Cheers

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

  • Posts: 23435
  • Thank you received: 3643
  • MODERATOR
7 months 4 weeks ago #298418

Hello,

With the current structure of the upload system, there is no override capabilities and the usage of plugins (triggers) would be more appropriate.
Since you want to authorize or not the upload depending custom settings, you want to handle the files before they are handle by the upload helper (before they are moved to the right folders).
Right now the features are more around the processing of the files after they have been moved in the folder (to resize, crop, watermark, etc). The creation of settings to specify a image size is too much specific ; I would rather prefer the possibility to give several possible dimensions or a ratio, etc. Unfortunately I do not see any ideal implementation right now so the usage of a plugin would be best to unsure the flexibility.

It might be something we can add before the next release (HikaMarket 3) but I would need the maximum details about your specifications.

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: 127
  • Thank you received: 8
7 months 4 weeks ago #298437

Hi Jerome,

I'll provide more details of our situation if its something you think is worthwhile adding to hikashop I know we would appreciate it being added.

At the moment if a vendor adds an image of their product to the store we are reliant on them uploading an image that is either at the specified resolution (not enforceable) or of the same aspect ratio as the hikashop image size (again not enforceable). If the image is too small it will pixelate or if the image has the incorrect ratio will be processed and white space added or the image is cropped. If the vendor uploads a portrait image in place of a landscape canvas it will either add white space to either side of the image or excessively crop the image to fit the size. This subtracts from the consistency of the store and likely turns people off, hurting sales.

I think it would be great to have an option to restrict an image upload to being a particular ratio (with a margin perhaps so the image doesn't have to be pixel perfect) along with limiting images to being at least X pixels in height or width (only one being required as the other can be derived)

This way when a customer is browsing the listings in a store there is no way possible for different vendors of different IT competency to detract from the consistency or layout of the store with odd shaped images.

If the above is not achievable are there any plugins you're aware of that would suit or will it require development?

Thanks,

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

  • Posts: 23435
  • Thank you received: 3643
  • MODERATOR
7 months 3 weeks ago #298471

Hello,

As I tried to explained in my previous message ; it will require a development in the HikaShop/HikaMarket cores to allow to perform such action via plugins.
It cannot be a feature directly provide by the components, it is too specific so it must be done in a plugin but it needs some modifications to allows plugins to do so.

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.059 seconds
Powered by Kunena Forum