<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>THE MOLITOR FORUMS &#187; Topic: Masonry grid layout + Jetpack Photon</title>
		<link>http://www.themolitor.com/forums/topic/masonry-grid-layout-jetpack-photon</link>
		<description>THE MOLITOR FORUMS &#187; Topic: Masonry grid layout + Jetpack Photon</description>
		<language>en-US</language>
		<pubDate>Tue, 28 Apr 2026 11:09:21 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.themolitor.com/forums/search.php</link>
		</textInput>
		<atom:link href="http://www.themolitor.com/forums/rss/topic/masonry-grid-layout-jetpack-photon" rel="self" type="application/rss+xml" />

		<item>
			<title>THE MOLITOR on "Masonry grid layout + Jetpack Photon"</title>
			<link>http://www.themolitor.com/forums/topic/masonry-grid-layout-jetpack-photon#post-27639</link>
			<pubDate>Mon, 10 Mar 2014 10:26:34 +0000</pubDate>
			<dc:creator>THE MOLITOR</dc:creator>
			<guid isPermaLink="false">27639@http://www.themolitor.com/forums/</guid>
			<description><p>Hi there,</p>
<p>Thanks for following up!</p>
<p>I appreciate you sharing your findings. That's really great.</p>
<p>Best,</p>
<p>Chris
</p></description>
		</item>
		<item>
			<title>americodias on "Masonry grid layout + Jetpack Photon"</title>
			<link>http://www.themolitor.com/forums/topic/masonry-grid-layout-jetpack-photon#post-27619</link>
			<pubDate>Sat, 08 Mar 2014 20:36:00 +0000</pubDate>
			<dc:creator>americodias</dc:creator>
			<guid isPermaLink="false">27619@http://www.themolitor.com/forums/</guid>
			<description><p>The problem was that, with Jetpack Photon activated, the width and height is not passed in the the_post_thumbnail... This is a 'necessary side-effect of using Photon':<br />
<a href="http://wordpress.org/support/topic/jetpack-photon-breaks-core-function-wp_get_attachment_image_src" rel="nofollow">http://wordpress.org/support/topic/jetpack-photon-breaks-core-function-wp_get_attachment_image_src</a></p>
<p>So... I wrote a small plugin - to avoid change the theme code - to output the width and height of the thumbnails even when Photon is activated. For those who may have the same problem as me, here is it:</p>
<pre><code>&#60;?php
/**
 * Plugin Name: Photon Masonry Fix
 * Plugin URI:
 * Description: Fix masonry grid layout when using Photon.
 * Version: 0.1
 * Author: Américo Dias
 * Author URI: <a href="http://americodias.com" rel="nofollow">http://americodias.com</a>
 * License: GPL2
 */

add_filter( &#039;post_thumbnail_html&#039;, &#039;remove_thumbnail_dimensions&#039;, 10, 5);

function remove_thumbnail_dimensions( $html, $post_id, $post_thumbnail_id, $size, $attr ) {
	$jetpack_active_modules = get_option(&#039;jetpack_active_modules&#039;);

	if ( class_exists( &#039;Jetpack&#039;, false ) &#38;&#38; $jetpack_active_modules &#38;&#38; in_array( &#039;photon&#039;, $jetpack_active_modules ) ) {
		// Photon is activated...
		if( &#039;&#039; != $html ) {
			// the post has thumbnail...
			$metadata = wp_get_attachment_metadata($post_thumbnail_id);
			$width = $metadata[&#039;sizes&#039;][$size][&#039;width&#039;];
			$height = $metadata[&#039;sizes&#039;][$size][&#039;height&#039;];
			$html = substr($html, 0, -2) . &#34;width=\&#34;$width\&#34; height=\&#34;$height\&#34; /&#62;&#34;;
		}
	}

	return $html;
}
?&#62;</code></pre></description>
		</item>
		<item>
			<title>americodias on "Masonry grid layout + Jetpack Photon"</title>
			<link>http://www.themolitor.com/forums/topic/masonry-grid-layout-jetpack-photon#post-27618</link>
			<pubDate>Sat, 08 Mar 2014 04:27:11 +0000</pubDate>
			<dc:creator>americodias</dc:creator>
			<guid isPermaLink="false">27618@http://www.themolitor.com/forums/</guid>
			<description><p>Hi!</p>
<p>Thank you for this great theme. I really like it.</p>
<p>I've done some modification to feet my needs and everything was working good. Although, when I activated the Photon service from Jetpack (a service to use WordPress cloud to serve the page images and increase loading speed), I noticed I have an overlap on the images when the page loads. After loading if I resize the browser window or if I reload the page, the images go to the right place.</p>
<p>I also noticed that you are using the Masonry version 1.3.2 when the last version of this script is the 3.1.4. Theres is any reason for that?</p>
<p>I could not correct this problem by myself, so I would like to ask you if you have any idea how can I solve this problem. My page URL is the following:</p>
<p><a href="http://americodias.com/viewfinder" rel="nofollow">http://americodias.com/viewfinder</a></p>
<p>Thank you in advance,<br />
Américo
</p></description>
		</item>

	</channel>
</rss>
