WordPress.org

Ready to get started?Download WordPress

Forums

Imsanity
Rsizing Uploaded Images in Pages (14 posts)

  1. egarywi
    Member
    Posted 2 years ago #

    I have installed Imsanity to re size my images automatically when I upload them into the Pages within Word press however I still get an error stating "File Size Error"

    As I understand it, imsanity should re size the file below the limit of 2Mb so that I do not have to manually re size the image, is that correct?

    http://wordpress.org/extend/plugins/imsanity/

  2. Jason
    Member
    Plugin Author

    Posted 2 years ago #

    i see what you mean. imsanity goes to work on the image after wordpress has already done it's security checks so the size error happens before the plugin has access to the image.

    it looks like it is feasible to do that using a different plugin hook, but it would require changes to the way imsanity works. i think it's a good idea, though, i'll put that on the list.

    if anybody has time to contribute, i'd be happy to add it to the code. right now imsanity hooks into "wp_handle_upload" where the file has already been accepted by wordpress and the file type has been determined. But it looks like it could hook into "wp_handle_upload_prefilter" instead, in which case imsanity will have to figure out the file type and do error checking.

  3. egarywi
    Member
    Posted 2 years ago #

    Thanks for the update, i have read that you are able to increase the size of the file to be uploaded by modifying the php.ini file, however my installation does not have a php.ini file either locally or on the server.

    I tried to create the ini file and load it in the admin directory however it had no effect, my thought was to increase the limit and then Imsanity could right size the file.

  4. Jason
    Member
    Plugin Author

    Posted 2 years ago #

    oh, hmm If you are talking about the wordpress file upload limit (in the site settings) then that is something the plugin could possibly solve in the future. but, the server setting in php.ini is not something that imsanity could solve because that happens before even wordpress can touch the file.

    you can look into overriding php.ini settings with an .htaccess file if your host allows it.

  5. egarywi
    Member
    Posted 2 years ago #

    Sorry, I didn't have any success with the php file, I am not that technical, I will have to leave it up to you, if you can overcome it with in the plugin that will be great, I will keep an eye out.

  6. Jason
    Member
    Plugin Author

    Posted 2 years ago #

    if it's a server setting then the plugin will never be able to overcome it, your host provider should be able to tell you how to change the setting (if they allow it)

  7. egarywi
    Member
    Posted 2 years ago #

    NO I am doing loccally (localhost) , Word press prevents me to upload the file due to the 2MB limit.

    I haven't got to the server yet :-)

  8. Jason
    Member
    Plugin Author

    Posted 2 years ago #

    oh i see. you just need to edit php.ini and change these settings to something big enough like:

    upload_max_filesize = 50M
    post_max_size = 50M

    the plugin can't overcome the PHP limits because PHP blocks the file before it gets to wordpress

  9. egarywi
    Member
    Posted 2 years ago #

    Yes that's what I read on the internet however I do not have the php.ini file in the word press directory?

    I created one and placed it in the root and in the admin directory however it had no effect.

    Any ideas?

  10. Jason
    Member
    Plugin Author

    Posted 2 years ago #

    you're going to have to do a little reading on where to put php.ini for your particular operating system

  11. egarywi
    Member
    Posted 2 years ago #

    Thanks for your help so far you have been great,

    Found the php.ini file in my MAC, looks like its not the problem, its set for 32M, seems like the file is being checked by WordPress before it has a chance to upload.

    Sort of takes away the appeal of the Imsanity to a large degree, do you think the plug in will be able to overcome this issue in the future?

  12. Jason
    Member
    Plugin Author

    Posted 2 years ago #

    i was mistaken in my earlier post, there is no file upload limit setting in wordpress. so if you're getting a file limitation error, the only place it can be changed is in the web server or php configuration.

    If you haven't already I would check this forum - http://wordpress.org/support/topic/how-to-increase-max-file-size-upload-limit-from-2mb

  13. zsero
    Member
    Posted 2 years ago #

    Or you can use Plupload which resizes using HTML5 on client size!
    http://wordpress.org/extend/plugins/wplupload/installation/

  14. Jason
    Member
    Plugin Author

    Posted 2 years ago #

    Cool plugin, yea the new HTML5 upload capabilities are really awesome. This is a very welcome update for uploading files.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags