0

Ok so i read a forum somewhere... that gave instructions on how to hardcode change the maximum image upload global values for "featured image" for woo commerce products, from a max of 3000px width and height so that I could restrict vendors from uploading large images. So I changed the values to 500px wide X 600px high, and it works like magic!!! BUT now I need to change it back and I've forgotten which file I changed due to a computer dying on me..... AAAAARG does anyone know where these settings live in the wordpress structure so I can reverse it back to 3000px X 3000px?

6
  • WordPress doesn't set maximum dimensions for uploaded images. You must've edited a plugin or added your own code. No one here can tell you which file you edited when it could be almost anything. Jan 9, 2019 at 7:50
  • I think it was a .css file but it was definitely in the wordpress structure... max width=3000px AND max height=3000px ... Apparently wordpress defines these values for the featured image as a standard... I changed them to 500px x 600px and it restricts my vendors from uploading anything larger.
    – Nettpress
    Jan 9, 2019 at 8:03
  • WordPress does not do that. If it was done with CSS then it would've been your theme. And CSS only affects the display of the image. It wouldn't prevent users uploading a larger image. Jan 9, 2019 at 8:42
  • Ok so that narrows it down because I just tried uploading a large product featured image as admin and it allowed it BUT when logged in as a vendor it prevented it sooo if i didn't do it in wordpress that makes me happier as it narrows down the search... but now I'm not sure it was a css it might have been a .js file... as these are the two file types I'm not very familiar with.... doah! wish i'd never changed it.... could be a year down the drain...
    – Nettpress
    Jan 9, 2019 at 9:19
  • Dump your database and search (grep) for lines with "500", "600" and "max" in them.
    – Jos
    Jan 9, 2019 at 10:14

1 Answer 1

0

It's set at the PHP level. In php.ini there's a line like

upload_max_filesize = 64M

which you may need to add or change. The file is at the root of your site, and might have to be added if it isn't there already. It's also possible to limit the size via the .htaccess file (which the web server looks at, and again is at the root of your site).

Also, this is a blanket limit, so if you wanted the limits to vary by role you'd probably need a plugin.

2
  • Thanks for that but that's not the issue... i've change the core max_image_upload width= 3000px into width=500px
    – Nettpress
    Jan 19, 2019 at 5:32
  • I either did this in Wordpress, WC vendors Pro, Woocommerce, PaidMemberships Pro... or some theme file.... I seem to remember it being a .css or a .js file that I changed because it was a min file.
    – Nettpress
    Jan 19, 2019 at 5:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.