Reputation:
Tumblr Restricts photosets to 500px. I would like to post photo sets larger than this width. If i change the 500 to something else, the posts do not display. Is there a way to post larger width photosets on tumblr?
{block:Photoset}
<p class="object">{Photoset-500}</p>
{block:Caption}<div class="caption">{Caption}</div>{/block:Caption}
{/block:Photoset}
Upvotes: 0
Views: 7699
Reputation: 1922
Ignore my previous answer. Here is what you need to do. Inside of your {block:Photoset}
use the following to display the large photos.
{block:Photos}
<img src="{PhotoURL-250}" class="photoset-image" />
{/block:Photos}
<script type="text/javascript">
var photos = document.getElementsByClassName("photoset-image");
for(var i = 0; i < photos.length; i++)
{
photos[i].style.width = '1280px'; // you can put whatever width you want here
var source = photos[i].src;
var pos1 = source.lastIndexOf('_');
var pos2 = source.lastIndexOf('.');
photos[i].src = source.substring(0, pos1 + 1) + '1280' + source.substring(pos2); // has to be 1280
}
</script>
All this is doing is taking the URL provided and replacing it with the 1280 one. Note: This will not work if a hi-res version doesn't exist. So, you might want to handle that programatically.
Upvotes: 2