Making WordPress.org


Ignore:
Timestamp:
02/10/2015 12:18:47 AM (10 years ago)
Author:
obenland
Message:

WP.org Themes: Use Photon for theme screenshots.

The Theme Directory feeds off of images to illustrate themes, so we will always
have a sizable footprint. In listings, screenshots are retina, so four times
the size they could be, on single they are over 700px wide. No reason not to
try our best to keep it managable though!

Using Photon will cut page weight to about half of what it is now.
We're adjusting the size to only what we need and remove all meta data.

See https://wordpress.slack.com/archives/meta/p1423518323000926

Fixes #845.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content.php

    r1147 r1238  
    1 <?php global $theme; ?>
     1<?php
     2    global $theme;
     3    $theme = wporg_themes_photon_screen_shot( $theme );
     4?>
    25<article id="post-<?php echo $theme->slug; ?>" class="theme hentry">
    36    <div class="theme-screenshot">
    4         <img src="<?php echo esc_url( $theme->screenshot_url ); ?>" alt="">
     7        <img src="<?php echo esc_url( $theme->screenshot_url . '?w=286&strip=all' ); ?>" alt="">
    58    </div>
    69    <a class="more-details url" href="<?php echo esc_url( home_url( $theme->slug . '/' ) ); ?>" rel="bookmark"><?php _ex( 'More Info', 'theme' ); ?></a>
Note: See TracChangeset for help on using the changeset viewer.