Und schon wieder ein kleines, aber dennoch nerviges Problem gelöst:
Seit irgendwann (angeblich seit Version 2.5 – mir ist es irgendwie erst seit 2.6 aufgefallen) verkleinert WordPress alle größeren Bilder, die man im Editor per „Bild hinzufügen“ eingefügt hat, selbständig auf eine Breite von 500 Pixeln. Dies geschieht sogar dann, wenn man zuvor im Dialog extra noch auf „vollständige Größe“ geklickt hat. Das Ganze soll seinen Sinn darin haben, daß man sich nicht versehentlich mit übergroßen Bildern sein Layout zersprengt.
Ich für meinen Teil sorge immer schon vor dem Upload dafür, daß meine Bilder eine geeignete Größe haben, und außerdem kann ich es auf den Tod nicht ausstehen, wenn irgendwelche Programme mich bevormunden! Natürlich kann man die Bildgröße später noch manuell ändern, aber wer hat da schon Lust zu…
Die Lösung fand ich hier: Irgendwo in seinem Theme, z. B. in der functions.php
, setzt man die Variable $GLOBALS['content_width']
auf die gewünschte Maximalbreite, die die Bilder haben sollen. Da ich wie gesagt über sämtliche Bildgrößen die volle Kontrolle haben will, habe ich diesen Maximalwert einfach auf 9999 gesetzt:
Setzt man diese Variable nicht, so wird – wie eingangs erwähnt – der Wert 500 benutzt.
[:] [:en]Yet another small, but annoying problem solved:
Since sometime ago (allegedly since version 2.5 – I haven’t noticed it until 2.6), WordPress has started to scale all larger images, which were added in the editor by clicking „add image“, down to a width of 500 pixels. This will also happen, if you even chose „full size“ in the dialogue before. This behaviour is meant to prevent you from accidentally hosing your layout with outsized images.
I for one always make sure my images have a suitable size before the upload, and aside from that, I loathe when programs infantilise me! Of course, one could still change the image size manually later, but who has the mind to do so…
I found the solution here: Somewhere in your theme, e. g. in functions.php
, set the variable $GLOBALS['content_width']
to the desired maximum width of your images. Like I said, I want to have full control over all image sizes, so I set this maximum value to 9999:
As mentioned above, if this variable is not set, the value 500 will be used instead.
[:]