Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter jancorazza

    (@jancorazza)

    I got a reply from the support in the meantime, sorry for not posting it before:

    Hi,

    Were these images uploaded before switching to the Twenty Thirteen theme? I ask because what you’re seeing appears to be tied into a specific set of circumstances.

    The Twenty Thirteen requests a “hard” crop of 604×270 for the featured image, which would add that size to the sizes automatically generated when uploading a new image. In my testing, with an image 2000×2000 uploaded before Twenty Thirteen was active, I could duplicate what you were seeing: without Photon, the image loaded 270×270, with Photon, 604×270.

    This happened because there wasn’t a 604×270 image on my local server (since the image was uploaded before Twenty Thirteen was active), so without Photon, the best it could do was the 270×270. Photon, however, takes the original images and returns the requested size—604×270—so it appears different.

    In my testing, if I uploaded a second 2000×2000 identical image, the 604×270 hard-cropped image was generated and both with Photon activated or deactivated, returned the oddly-cropped image.

    In short, this is the expected behavior of the theme and Photon “revealed” it, in your case.

    You can modify this in a child theme (see http://codex.wordpress.org/Child_Themes ). In the child theme’s function.php, you can add:

    function child_override_thumbnail_size() {
    set_post_thumbnail_size( 604, 270, false ); // in the original theme, it was set to true for a hardcrop
    }
    add_action( ‘after_setup_theme’, ‘child_override_thumbnail_size’ );

    Afterwards, I would download and install the Regenerate Thumbnails plugin ( http://wordpress.org/plugins/regenerate-thumbnails/ ). This plugin will rerun all of the thumbnail creation to match the current setup (e.g. the new crop setting set via the child theme).

    If you have any questions or need anything else, please let me know.

    Cheers!

    Brandon Kraft
    Happiness Engineer | Jetpack & WordPress.com

Viewing 1 replies (of 1 total)