Ich habs genau zweimal verändert.
Einmal im admin-function.php das zweite mal im inline-upload.php (beides zu finden im wp-admin)
hier im admin-function.php: (ziemlich weit unten)
function wp_shrink_dimensions($width, $height, $wmax = 384, $hmax = 256) {
if ( $height <= $hmax && $width <= $wmax )
return array($width, $height);
elseif ( $width / $height > $wmax / $hmax )
return array($wmax, (int) ($height / $width * $wmax));
else
return array((int) ($width / $height * $hmax), $hmax);
}
Hier jedoch habe ich nichts geändert, dies generiert nämlich das Thumbnail Im WYSIWYG Editor (admin/schreiben/Beitrag--->upload/alles durchsuchen) Und das wollen wir ja nicht... Sehr unübersichtlich... also belassen wir diese Werte!!! (Hier steckt wahrscheinlich auch die Wurzel zu deinem problem)
(Am Ende der admin-function.php zu finden)
function get_udims($width, $height) {
if ( $height <= 96 && $width <= 128 )
return array($width, $height);
elseif ( $width / $height > 4 / 3 )
return array(128, (int) ($height / $width * 128));
else
return array((int) ($width / $height * 96), 96);
}
Und hier im inline-upload.php:
$id = wp_insert_attachment($attachment, $file, $post);
if ( preg_match('!^image/!', $attachment['post_mime_type']) ) {
// Generate the attachment's postmeta.
$imagesize = getimagesize($file);
$imagedata['width'] = $imagesize['0'];
$imagedata['height'] = $imagesize['1'];
list($uwidth, $uheight) = get_udims($imagedata['width'], $imagedata['height']);
$imagedata['hwstring_small'] = "height='$uheight' width='$uwidth'";
$imagedata['file'] = $file;
add_post_meta($id, '_wp_attachment_metadata', $imagedata);
if ( $imagedata['width'] * $imagedata['height'] < 3 * 1024 * 1024 ) {
if ( $imagedata['width'] > 384 && $imagedata['width'] >= $imagedata['height'] * 4 / 3 )
$thumb = wp_create_thumbnail($file, 384);
elseif ( $imagedata['height'] > 256 )
$thumb = wp_create_thumbnail($file, 256);
if ( @file_exists($thumb) ) {
$newdata = $imagedata;
$newdata['thumb'] = basename($thumb);
update_post_meta($id, '_wp_attachment_metadata', $newdata, $imagedata);
} else {
$error = $thumb;
}
}
}
Alles anzeigen
Das wäre alles...
Hoffe es nützt!