De ontdekhoek Construction workers (Remko and Rik)
Nov 28
    Change language to :

So, today I "updated" wordpress to match my digital camera. Why did I do this? Well easy! :-) Currently wordpress supports thumbnails for uploaded pictures if the file is <= 3 megapixel in size. Not megabytes or something, megapixel.

I updated the wp-admin/includes/image.php file to be able to upload files (and thumbnail them) if they are bigger then that size. This way I can normally add my digital photos that were created by my Sony Alpha 100 camera.

What did I do?

Edit wp-admin/includes/image.php and search/replace the following line (at the moment of writing this is line 150 with wordpress 2.3.1)

CODE:
  1. $max = apply_filters( 'wp_thumbnail_creation_size_limit', 3 * 1024 * 1024, $attachment_id, $file );

with the following line:

CODE:
  1. $max = apply_filters( 'wp_thumbnail_creation_size_limit', <amount of megapixels you want to support here> * 1024 * 1024, $attachment_id, $file );

EDIT: Please take notice that you might run into server errors, because of PHP running out of it's allowed memory size. You can set these values in ``php.ini``.

written by Remko

3 Responses to ““Updated” wordpress to match my digital camera”

  1. Tim Says:

    I tried that too. Didn't work. I get an Internal Error 500. Did it work for you?

  2. Remko Says:

    Jip, i am currently supporting 11megapixel, do consider that your memory size limit could be reached, see your error logs for more information...

  3. Tim Says:

    Good point. Thanks.

Leave a Reply