Accessing a photo from the {body} of a text post

143 views
Skip to first unread message

Sushin Kelly

unread,
Jul 5, 2012, 7:07:31 AM7/5/12
to tumblr...@googlegroups.com
Is there any way to do this? Ideally I want to use the first photo in a text post on the front page of the tumblr site like you can do with a photo post. 

Vladimir Starkov

unread,
Jul 6, 2012, 8:08:59 AM7/6/12
to tumblr...@googlegroups.com
Try to use 

{block:Photos} {/block:Photos}Rendered for each of the Photoset photos

for output all your photos inline. Then use this css rule:`img:first-child {}` to styled only first image in photoset

Laura

unread,
Jul 15, 2012, 1:21:33 PM7/15/12
to tumblr...@googlegroups.com
Hey! I've got the same question and I'm looking for an answer all day...
Did it work to use {block:Photos} {/block:Photos} or did you find another solution?
Because I tried it and it didn't work.

Vladimir Starkov

unread,
Jul 16, 2012, 5:32:57 AM7/16/12
to tumblr...@googlegroups.com
I will try to find solution in next two weeks

explaura

unread,
Jul 16, 2012, 6:04:55 AM7/16/12
to tumblr...@googlegroups.com
thx a lot!

Vladimir Starkov

unread,
Jul 16, 2012, 7:02:03 AM7/16/12
to tumblr...@googlegroups.com
What have you tried? because simple method from SO should work:

{block:Photos}
<img src="{PhotoURL-500}" class="photoset-image" />
{/block:Photos}
I think this method should work.


On Sunday, July 15, 2012 11:21:33 PM UTC+6, explaura wrote:

Sush

unread,
Jul 16, 2012, 7:08:09 AM7/16/12
to Vladimir Starkov, tumblr...@googlegroups.com
That is ok if it is a photo type block but not if you are using a text type block with an image in the body? 

I may well have crossed wires here :) 


--
You received this message because you are subscribed to the Google Groups "Tumblr Themes" group.
To view this discussion on the web visit https://groups.google.com/d/msg/tumblr-themes/-/GllKA2CkftMJ.

To post to this group, send email to tumblr...@googlegroups.com.
To unsubscribe from this group, send email to tumblr-theme...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tumblr-themes?hl=en.

explaura

unread,
Jul 16, 2012, 7:52:06 AM7/16/12
to tumblr...@googlegroups.com
{block:Photos}
<img src="{PhotoURL-500}" class="photoset-image" />
{/block:Photos}

really doesnt work with text posts...

Vladimir Starkov

unread,
Jul 16, 2012, 8:35:35 AM7/16/12
to tumblr...@googlegroups.com
Oh it is not tumblr themes question, but it is HTML & CSS question.

Use First of type css selector like this:

.post img:first-of-type {
    border: 1px solid red; /* customizations only for demonstration */
}

Vladimir Starkov

unread,
Jul 16, 2012, 8:36:36 AM7/16/12
to tumblr...@googlegroups.com
May be i found solution


On Thursday, July 5, 2012 5:07:31 PM UTC+6, Sushin Kelly wrote:
Reply all
Reply to author
Forward
0 new messages