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]
$max = apply_filters( 'wp_thumbnail_creation_size_limit', 3 * 1024 * 1024, $attachment_id, $file );
[/code]

with the following line:
[code]
$max = apply_filters( 'wp_thumbnail_creation_size_limit', * 1024 * 1024, $attachment_id, $file );
[/code]

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

Share →

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

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>