[Skip to main content](#vessel-content)

#   restrict vendor image size

##

- **[christofu](/forum/user/31338-christofu "View christofu's Profile")**
- [![christofu's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31338-christofu "View christofu's Profile") Topic Author
- [ Offline](/forum/user/31338-christofu)

Less More

- Posts: 108
- Thank you received: 6
-
-

12 years 3 weeks ago [\#175568](#175568) by [christofu](/forum/user/31338-christofu "View christofu's Profile")  *[restrict vendor image size](/forum/20-market-feature-requests/872319-restrict-vendor-image-size#175568 "-- HikaShop version -- : 2.3.3 -- HikaMarket version -- : 1.4.4 -- Joomla version -- : 3.3.3  Hi,  I am looking to be able to restrict the image size for the vendor. I am able to control its appearance size, but would like to be able to restrict the image size in KB, so a user doesnt upload large image files and start to fill up the server space unnecessarily.  when I set the image width &amp; height, and force size (in configuration), does this resize the incoming image to that size on the server? or does it create a &quot;thumbnail&quot; of that size?  if not, is there a way of controlling this?")* was created by *[christofu](/forum/user/31338-christofu "View christofu's Profile")*

-- HikaShop version -- : 2.3.3
-- HikaMarket version -- : 1.4.4
-- Joomla version -- : 3.3.3

Hi,

I am looking to be able to restrict the image size for the vendor. I am able to control its appearance size, but would like to be able to restrict the image size in KB, so a user doesnt upload large image files and start to fill up the server space unnecessarily.

when I set the image width &amp; height, and force size (in configuration), does this resize the incoming image to that size on the server? or does it create a "thumbnail" of that size?

if not, is there a way of controlling this?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIwLW1hcmtldC1mZWF0dXJlLXJlcXVlc3RzLzg3MjMxOS1yZXN0cmljdC12ZW5kb3ItaW1hZ2Utc2l6ZT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

12 years 2 weeks ago [\#175587](#175587) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[restrict vendor image size](/forum/20-market-feature-requests/872319-restrict-vendor-image-size#175587 "-- HikaShop version -- : 2.3.3 -- HikaMarket version -- : 1.4.4 -- Joomla version -- : 3.3.3  Hi,  I am looking to be able to restrict the image size for the vendor. I am able to control its appearance size, but would like to be able to restrict the image size in KB, so a user doesnt upload large image files and start to fill up the server space unnecessarily.  when I set the image width &amp; height, and force size (in configuration), does this resize the incoming image to that size on the server? or does it create a &quot;thumbnail&quot; of that size?  if not, is there a way of controlling this?")*

Hi,

We do not have an option (yet) for that but you can already set that limitation in HikaMarket.
For the moment you need to edit the file "components/com_hikamarket/controllers/product.php" and replace Code:

if($vendor_id &gt; 1) $options['sub_folder'] = 'vendor'.$vendor_id.DS;

By Code:

if($vendor_id &gt; 1) { $options['sub_folder'] = 'vendor'.$vendor_id.DS; $options['max_file_size'] = 400*1024; // 400K }

in order to set the max file size that the vendor have the right to upload in the front-end.
About the parameters for the image, the HikaShop image configuration is used for that, so if you put a restriction for your vendors, it will restrict your uploads in the backend too.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIwLW1hcmtldC1mZWF0dXJlLXJlcXVlc3RzLzg3MjMxOS1yZXN0cmljdC12ZW5kb3ItaW1hZ2Utc2l6ZT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[christofu](/forum/user/31338-christofu "View christofu's Profile")**
- [![christofu's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31338-christofu "View christofu's Profile") Topic Author
- [ Offline](/forum/user/31338-christofu)

Less More

- Posts: 108
- Thank you received: 6
-
-

12 years 2 weeks ago [\#175590](#175590) by [christofu](/forum/user/31338-christofu "View christofu's Profile")  Replied by *[christofu](/forum/user/31338-christofu "View christofu's Profile")* on topic *[restrict vendor image size](/forum/20-market-feature-requests/872319-restrict-vendor-image-size#175590 "-- HikaShop version -- : 2.3.3 -- HikaMarket version -- : 1.4.4 -- Joomla version -- : 3.3.3  Hi,  I am looking to be able to restrict the image size for the vendor. I am able to control its appearance size, but would like to be able to restrict the image size in KB, so a user doesnt upload large image files and start to fill up the server space unnecessarily.  when I set the image width &amp; height, and force size (in configuration), does this resize the incoming image to that size on the server? or does it create a &quot;thumbnail&quot; of that size?  if not, is there a way of controlling this?")*

brilliant i'll try that now.

can you tell me if this will also apply to custom fields - in particular the ajax image field?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIwLW1hcmtldC1mZWF0dXJlLXJlcXVlc3RzLzg3MjMxOS1yZXN0cmljdC12ZW5kb3ItaW1hZ2Utc2l6ZT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

12 years 2 weeks ago [\#175592](#175592) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[restrict vendor image size](/forum/20-market-feature-requests/872319-restrict-vendor-image-size#175592 "-- HikaShop version -- : 2.3.3 -- HikaMarket version -- : 1.4.4 -- Joomla version -- : 3.3.3  Hi,  I am looking to be able to restrict the image size for the vendor. I am able to control its appearance size, but would like to be able to restrict the image size in KB, so a user doesnt upload large image files and start to fill up the server space unnecessarily.  when I set the image width &amp; height, and force size (in configuration), does this resize the incoming image to that size on the server? or does it create a &quot;thumbnail&quot; of that size?  if not, is there a way of controlling this?")*

Hi,

The ajax image field for what kind of custom field ?
The patch I gave you is targeting product images and product files.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIwLW1hcmtldC1mZWF0dXJlLXJlcXVlc3RzLzg3MjMxOS1yZXN0cmljdC12ZW5kb3ItaW1hZ2Utc2l6ZT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[christofu](/forum/user/31338-christofu "View christofu's Profile")**
- [![christofu's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31338-christofu "View christofu's Profile") Topic Author
- [ Offline](/forum/user/31338-christofu)

Less More

- Posts: 108
- Thank you received: 6
-
-

12 years 2 weeks ago [\#175721](#175721) by [christofu](/forum/user/31338-christofu "View christofu's Profile")  Replied by *[christofu](/forum/user/31338-christofu "View christofu's Profile")* on topic *[restrict vendor image size](/forum/20-market-feature-requests/872319-restrict-vendor-image-size#175721 "-- HikaShop version -- : 2.3.3 -- HikaMarket version -- : 1.4.4 -- Joomla version -- : 3.3.3  Hi,  I am looking to be able to restrict the image size for the vendor. I am able to control its appearance size, but would like to be able to restrict the image size in KB, so a user doesnt upload large image files and start to fill up the server space unnecessarily.  when I set the image width &amp; height, and force size (in configuration), does this resize the incoming image to that size on the server? or does it create a &quot;thumbnail&quot; of that size?  if not, is there a way of controlling this?")*

its actually for a vendor field

I have a vendor adding another image as a custom background for their page. I would love to restrict them to uploading an image by pixel size (e.g. 900px x 250px) but would accept being able to limit it by file size

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIwLW1hcmtldC1mZWF0dXJlLXJlcXVlc3RzLzg3MjMxOS1yZXN0cmljdC12ZW5kb3ItaW1hZ2Utc2l6ZT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

12 years 2 weeks ago [\#175736](#175736) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[restrict vendor image size](/forum/20-market-feature-requests/872319-restrict-vendor-image-size#175736 "-- HikaShop version -- : 2.3.3 -- HikaMarket version -- : 1.4.4 -- Joomla version -- : 3.3.3  Hi,  I am looking to be able to restrict the image size for the vendor. I am able to control its appearance size, but would like to be able to restrict the image size in KB, so a user doesnt upload large image files and start to fill up the server space unnecessarily.  when I set the image width &amp; height, and force size (in configuration), does this resize the incoming image to that size on the server? or does it create a &quot;thumbnail&quot; of that size?  if not, is there a way of controlling this?")*

Hi,

The custom fields are not managed by HikaMarket but by HikaShop itself.
It uses the HikaShop upload system and the controller "order" which made all checks for all custom fields.
Because HikaMarket is using the HikaShop custom field system, it does not have the control of the upload.
So it's something to change into HikaShop.

The idea I got was to extend the "ajax file" and "ajax image" in order to add new options.
These options could then be loaded in the controller and set to the upload setting data.
You can open the file "components/com_hikashop/controllers/order.php" and check the function "getUploadSetting".
You will see that the custom field is loaded and his settings are checked.
You can add your "max_file_size" option depending the name of the custom field ; in order to wait for the improvement for the "ajax file/image" configuration.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIwLW1hcmtldC1mZWF0dXJlLXJlcXVlc3RzLzg3MjMxOS1yZXN0cmljdC12ZW5kb3ItaW1hZ2Utc2l6ZT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.064 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
