Adding photos to journal and news posts

Okay, so let's put some pics in your posts!

The basic code is <img src="https://www.website.com/imagename.jpg">

img = image
src = source

Now if you have images on iNat that you'd like to use, you need the path to the particular photo (not to the observation). So, I've chosen a random ob https://www.inaturalist.org/observations/19800494 to work with. All photos used in this post are by Tannie Di @outramps - she asked so nicely for some help :-)

STEP ONE - locating an image on iNat
RIGHT-CLICK on the image you want to use in your journal post, LEFT-CLICK on Copy image location. We'll use the first image as example. Then on your journal post, add the text <img src=" and then PASTE the location you copied from your image - in this case https://static.inaturalist.org/photos/30519569/large.jpeg?1548163737, then type "> so it looks like this <img src="https://static.inaturalist.org/photos/30519569/large.jpeg?1548163737">

That's one image and it will be the width of the journal post box, like so:

STEP TWO - locating an image not on iNat
To link to an image that's on the internet but not on iNat, you use the same method above. The image must be yours or you must have permission to use it and credit the photographer/illustrator (this is true for iNat pics as well, of course!!). The image has to be on the internet, not on your hard disk/computer!

STEP THREE - images in rows
Now, if you want to add, say, 3 pics in a row, you need to add a bit of extra code to stipulate the width of each pic. We'll use percent rather than specific width so that it looks good on different screen sizes (hopefully). So, the extra code is style="width:33%" which will give you 3 pics in a row. If you want 2 pics then you'd use 50% etc.

So our code for 3 pics in a row looks like this <img src="https://static.inaturalist.org/photos/30519569/large.jpeg?1548163737" style="width:33%"> (repeated 3 times) and it looks like this (using the same pic):

Of course you'd want to use 3 different pics, so you copy the image location for each one as in Step 1, for example:
<img src="https://static.inaturalist.org/photos/30519569/large.jpeg?1548163737" style="width:33%"><img src="https://static.inaturalist.org/photos/28828589/large.jpeg?1543914495" style="width:33%"><img src="https://static.inaturalist.org/photos/14337452/large.jpeg?1521637401" style="width:33%">
and you will end up with something like this:

STEP FOUR - adding spaces between pics in rows
Now, the pics are all 'stuck together', which is not a bad thing, but you might want to have some 'breathing space' between them, so you need to add a bit of code to the style attribute - padding:10px; - so your code for each image now looks like this - <img src="https://static.inaturalist.org/photos/30519569/large.jpeg?1548163737" style="width:33%; padding:10px;"> and the pics look like this:

You can change the width of the space between the pics as you choose. I have used 10 pixels here, but you can use less (~ 5px) or more (~ 20px). Play with it and see what works for you on the particular post you're creating.

STEP FIVE - Advanced resizing
(Only go here if you're feeling brave.)
In the above example the pics are all different sizes and you may want them the same height without squishing them widthways. For this you have to stipulate max-height and max-width. The max-width can remain a percentage, but the max-height has to be an actual pixel height which is where things can go a bit wobbly. So, to get the max-height you'll have to play around with pixel sizes until you get what you're looking for. Change the size and then check in PREVIEW how it's going to look. If it's not right, increase or decrease the number of pixels. For this example I have used 200px - style="max-width:33%; max-height:200px; padding:10px;" and it looks like this:

The original pics have to have a height of greater than your max-height to end up the same height on your post using this method. If the original pics are smaller, then you will end up with a row of pics of different heights anyway. This is very advanced stuff, so if you've got here, well done, and you can go and have a coffee now ;-)

{I typed this up very quickly, so if I have not been clear, or you have any suggestions for improvement, please let me know!}

Anotado por karoopixie karoopixie, 29 de enero de 2019 a las 08:57 AM

Comentarios

Thansk very much Marion. When I'm feeling strong, I'll have a go. Very much appreciate the time you put into this

Anotado por outramps-tanniedi hace mas de 2 años (Advertencia)

Pleasure Di :-)

Anotado por karoopixie hace mas de 2 años (Advertencia)

Thank you :-)

I also use proper style syntax because width=x% is deprecated and I don't want journal posts to lose their formatting when peeps upgrade their browsers. Also, iNat's native style sheets sometimes fight with my code (they always win), so proper syntax helps to ensure that the code we use is honoured.

Anotado por karoopixie hace mas de 2 años (Advertencia)

Marion this is very clever, thank you! ;-)
And, yay, I was successful in bringing in one of my own observation pics onto my journal.

Can you please explain how import an external pic (i.e not an inat obs)? I tried, using the image path/name, but nah. Bear in mind I am not at all streetwise when it comes to coding.

Tks!

Anotado por sandraf hace mas de 2 años (Advertencia)

Sandra, give me the URL address of the pic you're trying to use, please.

Thanks for the compliment :-)

Anotado por karoopixie hace mas de 2 años (Advertencia)

Haha or eeek

My files are not stored in the cloud...is that what you mean?

If not in cloud storage, can one still upload non-iNat obs pics?

I

Anotado por sandraf hace mas de 2 años (Advertencia)

Okay, the pic has to be on the web somewhere, you can't, unfortunately, link to a pic on your computer.

I will edit my post to make that clearer.

Anotado por karoopixie hace mas de 2 años (Advertencia)

Aha, that figures.
Tks so much. Could be useful one day!

Anotado por sandraf hace mas de 2 años (Advertencia)

How to add photos that are just on my computer, not observations?

Anotado por jennyh hace cerca de 2 años (Advertencia)

@kiwifergus turns out flickr is the answer; you just upload your photos to flickr and specify the desired license for the photo, make it visible to the public, then use the handy "share" > "embed" option to put it in your journal post. Here's what mine turned out like:
https://www.inaturalist.org/projects/california-pollination-project/journal/26362-sierra-nevada-challenge-2019-updates

Anotado por jennyh hace cerca de 2 años (Advertencia)

Thanks! At the time I tried Instagram and photo's uploaded to google photo albums, but no luck with those routes!

Love the pollination graphic and it would be useful and valuable to store similar work in one's journal with visual representation as you have done

@sallyslak the pollination graphic could be a way to represent your interactions and the latest Cynanchum saga

Anotado por sandraf hace cerca de 2 años (Advertencia)

@kiwifergus I used the program R to generate the figures, I am happy to share code.

Anotado por jennyh hace cerca de 2 años (Advertencia)

Nice tutorial @karoopixie, thank you for linking it to the Forum!

Anotado por jdmore hace cerca de 2 años (Advertencia)

Thank you for the help. I uploaded the image to Facebook, used the code, and I believe it has worked. I will update you if it has not!

Anotado por mamestraconfigurata hace casi 2 años (Advertencia)

Thank you, this was so helpful!

Anotado por aspencer hace más de un año (Advertencia)

Thank you for the thanks, everyone :-) I'm very glad this has been helpful.

Anotado por karoopixie hace más de un año (Advertencia)

@karoopixie Is there a way to rotate photos in a journal post? I am using someone else's photo in a post, so I don't have control over what it looks like on its own, and I usually have better luck pulling photos from the internet, rather than downloading and uploading them somewhere else.
BTW this post has made my journal posts SO much better so thank you so very much for laying this out!!!

Anotado por mklein1216 hace cerca de un año (Advertencia)

@mklein1216 yes you can rotate images. Add this to your style attribute transform:rotate(90deg);

Change the degree of rotation to suit. I have used 90deg in the example, but you could use 180deg or 270deg as well.

This won't necessarily work on all browsers!!

Thank you for your kind words :-)

Anotado por karoopixie hace cerca de un año (Advertencia)

@karoopixie Thank you so much! Much appreciated!

Anotado por mklein1216 hace cerca de un año (Advertencia)

This post is now available in Russian :-) https://www.inaturalist.org/journal/alex_iosipenko/43527- thanks to @alex_iosipenko
Этот пост теперь доступен на русском языке :-) https://www.inaturalist.org/journal/alex_iosipenko/43527- спасибо @alex_iosipenko

Anotado por karoopixie hace 12 meses (Advertencia)

Thanks so much for this - it's really useful. One small note - there's a typo in the first bit of code. It should be src, not scr. Thanks again!

Anotado por slow_walker hace 8 meses (Advertencia)

Pleasure, @slow_walker :-) Thank you for pointing out the typo! Have fixed.

Anotado por karoopixie hace 8 meses (Advertencia)

It's not working for me in comments anymore, has something changed?

Anotado por zdanko hace 7 meses (Advertencia)

Point me to the recalcitrant comment, @zdanko ;-)

Anotado por karoopixie hace 7 meses (Advertencia)

smh it's working now lol

Anotado por zdanko hace 7 meses (Advertencia)

Thank you! I need this!

Anotado por cheekychew hace 6 días (Advertencia)

Thanks, Chrissie! Unfortunately all the image links are broken now :-( I don't have the energy to redo it all right now...

Anotado por karoopixie hace 5 días (Advertencia)

That's ok . I can figure it from here! ( What I seriously need is a way to search my" Favorites" to separate the moths from the rest. I have sleepless nights on my hands and am (carefully) trying to do some id's . I cant find a way to do that..

Anotado por cheekychew hace 5 días (Advertencia)

@cheekychew there is currently no inbuilt way to filter your faves. There is a feature request on the forum - https://forum.inaturalist.org/t/add-search-feature-in-favorites/2502 - which is 2.5 years old, so probably not something that will be implemented soon. There are some suggestions there that may help you though...

Anotado por karoopixie hace 5 días (Advertencia)

I saw that ,I dont think that request serves their original purposes for faves, I will just have to work around it, for now, or ever... Thank you for the the response.

Anotado por cheekychew hace 5 días (Advertencia)

Añade un comentario

Entra o Regístrate para añadir comentarios