Question

Is there a way to limit the size (dimensions) of the image a user can upload to their profile? It looks like Wordpress does do some kind of limiting as uploading a 1024x768 image the result gets scaled down to 360x270, but where is that configured, either in the UI (which I haven't found) or through code?

This is the section of the user profile I'm referring to: alt text

Was it helpful?

Solution 3

It looks like the author image section of the User Profile editor was from the "Author Image" plugin. I didn't suspect that at first because I didn't know that plugins were allowed to modify that screen, so I thought it was just a build-in Wordpress function and that the plugin just allowed for easy display.

As it doesn't look like the plugin has a settings page I ended up just modifying the plugin itself. For those curious, the file to modify is sem-author-image-admin.php and the variable is about 3/4 of the way down, just search for the comment // Set a maximum height and width and you'll find it. (There's no guarantee that this will remain the same in future versions and upgrading the plugin will most likely break this, just an FYI)

OTHER TIPS

WordPress automatically resizes uploads into different formats based on the settings on the Settings » Media page:

Media settings page

You can set up all of your different default sizes here. Though keep in mind that plug-ins and themes can define their own custom image sizes ... so I can't guarantee perfect operability in all cases.

Being the author of the plugin in question, there actually is a limit. (It's 360x360.) Else +1 to Davy8's answer.

I could add a define in a future version...

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top