2

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

3 Answers 3

4

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.

1
  • It was a bad assumption on my part that the Author Image section of a user's profile admin page was build-in to Wordpress and not created by the plugin, which explains why I had difficulty finding an answer on Google. I had actually tried the media settings, but they didn't do anything because it wasn't being manipulated by Wordpress.
    – David Ly
    Commented Dec 3, 2010 at 20:48
3

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...

1
  • Add a filter for customizations per functions.php. Please. :)
    – fuxia
    Commented Dec 4, 2010 at 2:06
2

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)

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.