WordPress Plugin: Resize at Upload Plus

Okay, es ist nicht wirklich ein “neues” Plugin, eher eine Verbesserung eines sehr einfachen aber dennoch sehr sinnvollem und nützlichen Plugin namens  Resize at Upload. Dieses Plugin verkleinert automatisch Bilder, die hochgeladen werden, falls diese einen Maximalwert übeschreiten. Dies ist besonders praktisch, falls ein Kunde seine 25 Megapixel Bilder hochlädt und sich dann wundert, warum das Layout zerschossen ist ;)

Nachdem mir eine Option der Höhenregulierung fehlte, und Anton sein Plugin weiterhin einfach und leicht halten wollte, habe ich es einfach selbst hinzugefügt. Und ich mich gerne in Ruhm und Ehre bade, schreibe ich darüber :)

Okay, actually it’s not a new plugin, it’s just an improvement of a really neat and simple plugin called Resize at Upload. This plugin will automatically resize images that are too large when they’re uploaded – if your client choses to directly import his 25 megapixel photos ;)Resize at Upload will reduce the dimensions to those that you set. This will conserve webspace and keep your layout nice and tidy.

Since I missed an option to also set a max height, I simply added it to Anton’s plugin. And since I’m hungry for fame, I post about it :)


Meine Modifizierung hier herunterladen

Die Anwendung ist simpel:

  1. Meine Version des Plugins herunterladen
  2. unzippen
  3. In das yoursite/wp-content/plugins Verzeichnis hochladen
  4. aktivieren
  5. Einstellungen checken und anpassen.

Dann

  1. Hierher zurückkehren und einen Kommentar hinterlassen, wie toll meine Modifikation doch ist
  2. Zu Anton’s Seite surfen und auch ihm danken, dass er das Plugin erdacht, programmiert und verbreitet hat.

Spenden

Sollte dieses Plugin Euch Freude bereiten, oder einProjekt vereinfachen / ermöglichen, oder einen Kunden zufriedenzustellen, so würde ich mich über eine Spende freuen. Ich werde 50% aller Eingänge mit Anton teilen, da sein Plugin die Basis von meinem ist.
[donate]

Download my modification here

Usage is simple:

  1. Download the my version of the plugin
  2. unzip
  3. upload to yoursite/wp-content/plugins directory
  4. activate
  5. check the settings and adapt to your needs.

Then

  1. come back here and post a comment about how cool this plugin is
  2. go to Anton’s site and thank him for doing the heavy lifting and coming up with a splendid plugin like this

Donate

Should this plugin prove useful by either simplifying your blog, or maybe even please your customer I would appreciate it if you would donate whatever you deem appropriate. I’ll share it with Anton.
[donate]

Kommentare:

1. Matt&hellip | 10. Februar 2009 um 19:24

I have your plugin and it looks like a great plugin. I’m going to help with a donation. I’m wondering how I can tweak it. I am working on a photoblog network and using the Monotone Wordpress theme. It works by by scaling photos to a maximum 840 pixels wide and a minimum width of 560. It somehow does this and renders the photos a good size for horizontal and vertical photos. I wanted to somehow do this at the upload an save myself considerable space on my server. Considering everyone on the network will have a photoblog, it’s important to somehow limit the upload post size properly.

How would I add a minimum width to the plugin you made?

Thanks for this opportunity to talk with you on this. I look forward to talking with you soon on this. If you needed a certain amount let me.

It would be better to have this actually part of the default upload process instead of a plugin, but a plugin would be good enough until I could actually pay someone to code it into the upload process.

I am using Wordpress MU with Monotone theme.


2. daniel&hellip | 11. Februar 2009 um 11:13

Hmm, I must admit I have never ever touched WordPress MU.

But I see what the monotone theme does – it makes the image span from border to border (pretty much like my theme here :) ). To prevent the image from being to thin, it resizes an image to a minimum of 560px.

Since it makes no sense to enlarge an image on upload, I would pretty much ignore this min-width setting and instead instruct my users to make sure they upload images that are “big enought”, like at least 500k. (Some people have no idea what pixels are and instead select “small” and “large” images based on filesize).

Then set up this plugin to simply limit the width to a max of 840px. This will then save your webspace, traffic etc.
Actually, you do not need this plugin since the height is irrelevant for you – go to Anton’s site and download the original “Resize at upload” Plugin.

I actually got an Idea for an extension of this plugin … a “Are you sure you want to upload this teensy weensy image” Notification if a user decides to upload a miniature image :)


3. ryan&hellip | 12. Mai 2009 um 14:46

I’m also running wordpress multi and would like to use it. I tried to activate it sitewide and it didn’t work. maybe I can call your plugin from the upload php file?


4. admin&hellip | 12. Mai 2009 um 17:05

It won’t resize images that are already on the site. Only works for newly uploaded images.


5. Stag party cornwall&hellip | 26. Mai 2009 um 10:22

Hi there,

i am using your plugin but have run into a problem. If i upload a file over 2m. I am on a shared server, without access to a Php.ini. I can create a custom one. Can you tell me where to put it for this plugin to work.

many thanks


6. yemoonyah&hellip | 03. Juni 2009 um 08:46

Hallo

Erstmal danke fuer dieses plugin! Es ist sehr wichtig fuer meinen Blog da ich viele Bildr zeige und es spart mir einen Haufen Arbeit!

habe dein plugin installiert und bis jetzt war alles wunderbar. Aber jetzt bekomme ich diese Fehlermeldung:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 14592 bytes) in /home4/public_html/wp-content/plugins/resize-at-upload-plus/class.resize.php on line 179

Ich habe auf line 179 nachgesehen aber da steht nicht von memory size

Was kann ich tun?

Danke und Gruss aus Berlin


7. admin&hellip | 03. Juni 2009 um 09:11

@yemoonah: Danke für die Blumen :)
Das mit dem Speicherproblem ist eine Einstellungssache des Servers. Entweder Du hast Zugriff auf eine php.ini, oder Du gehst in die Webspace-Admin-Oberfläche, die die meisten Webhosts anbieten, und erhöhst den verfügbaren Speicher für PHP.
Wenn Du keine php.ini findest, und auch keine Möglichkeit in der Webkonfiguration findest musst Du Dich an Deinen Webhost wenden. Die meisten, mit denen ich zu tun hatte, sind da sehr zuvorkomment und erhöhen den PHP Speicher ohne Probleme.


8. admin&hellip | 03. Juni 2009 um 09:13

@tag party: Unfortunately this will not work.
The php.ini is not located in your webspace, it’s somewhere inside the server’s main file system, so creating your own php.ini will not help you.
You need to go into your webspace admin area (usually the place where you add/remove subdomains, or add/remove other domains, manage your databases etc.) and find the option for php memory. If you can’t find that, ask your webhost to up the available memory for php.


9. ownong&hellip | 06. Juli 2009 um 12:11

thanks a lot for this plugin
tried some css editing but the height is usually “unscaled”

Your plugin really did the job!


10. Thomas&hellip | 19. September 2009 um 20:14

Your plugin is really great but due to some trouble with php memory_limit, I change the resizing code in _resize by

$cmd = ‘convert ‘.$strOriginalImagePath.’ -resize ‘.$numWidth.’x’.$numHeight.’ ‘.strResizedImagePath;
$res = shell_exec($cmd);

it could be interesting to add it definitivly by adding an option in the administration part.

Thomas


11. Nathan Wells&hellip | 22. Oktober 2009 um 17:43

Is there a way to re-size images that have already been uploaded?


12. Daniel&hellip | 22. Oktober 2009 um 21:07

Not with my plugin, but there is an excellent tool called “scissors” that’ll let you resize and crop your images. One by one, though. No way to batch-resize. In that case I’d download the images via FTP, then resize with a program on your computer, then re-upload.


13. reidlos&hellip | 25. Februar 2010 um 16:10

You show this screen “Resize at upload Options” everywhere, but I can’t find it anywhere. When I click Edit next to the plugin it just sends me to the place where you can edit the PHP files. How do I get the GUI settings page like you have?


14. Daniel&hellip | 25. Februar 2010 um 18:48

You need to click on “settings” in your dashboard. Right where you would change your blog title, your permalinks etc there will be a new option called “Resize At Upload Plus”.


15. Nathan&hellip | 03. März 2010 um 11:14

Hi,

Does this work on all uploaded images? I’m using photosmash and simple press forum, these images don’t get saved to the upload folder in wp-content.

Thanks


16. Daniel&hellip | 03. März 2010 um 11:57

All this plugin does is display all the images that are attached to a post or a Page.
What this means is you need to upload the image by using the upload-media button when EDITING the post or Page. Only by doing that will the image actually be a child of the post – and show up using easypermgals.
The actual location of the files doesn’t matter.


17. Nathan&hellip | 03. März 2010 um 15:38

That’s what I thought. Unfortunately it is the forum users that I’m most worried about! I’m guessing that it wouldn’t be an easy hack to change this.

I’ve still got it turned on though. This is a great plugin, especially where there are lots of authors (or even one or two non IT-literate ones!)

Thanks again.


18. Daniel&hellip | 03. März 2010 um 16:05

To be honest, I didn’t even know it worked in Simple:Press forum.
Let me see if there are ways I can make the plugin stop working inside of forum posts.


Kommentar hinterlassen:

Pflichtfeld

Pflichtfeld, hidden

Trackback  |  Kommentare als RSS Feed abonnieren