Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-09-02 08:36:24

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 446
Website

New Google Images Licensing Program

On August 31, Google Images started showing links that show how and where your image can be licensed. Additionally, your image will feature a Licensable badge.

If you have a txp site for promoting photographs or other images, this could mean more customers for you.

It is very easy to get your licensing information listed on Google Images. You only have to add some simple structured data to your site.

Here is some code to quickly and easily accomplish this:

<txp:if_individual_article>
<txp:if_section name="photography">

    <script type="application/ld+json">
    {
      "@context": "https://schema.org/",
      "@type": "ImageObject",
      "contentUrl": "<txp:image_url id='<txp:custom_field name="article_image" />' />",
      "license": "<txp:site_url trim="/" />/info/29/license-agreement",
      "acquireLicensePage": "<txp:site_url trim="/" /><txp:page_url />"
    }
    </script>

</txp:if_section>
</txp:if_individual_article>

Notes

  1. Replace photography with the name(s) of the section(s) where your images are displayed.
  2. This code assumes that your article image is the main image. Replace if necessary.
  3. Replace /info/29/license-agreement with the link to your license agreement.
  4. This code assumes that the image can be licensed on the page it is displayed on. If you have a special order page, replace <txp:page_url /> with the path to that page. For example: /info/30/order-form
  5. I have put this code in a custom output form named head, which is then added just below the <title> tag in the <head> of the page:
<html>
 <head>
  <title>TITLE OF PAGE</title>
  <txp:output_form form="head" />
 </head>
 <body>
 </body>
</html>

Additionally, it is also a good idea to add licensing information to the IPTC metadata of your images. If you are using Photo Mechanic, this is also easy (though a bit time-consuming) to accomplish.

Read the Photo Mechanic IPTC instructions for Google Images Licensing.

Incidentally, it would be neat to have a plugin for the above code.

Last edited by Kjeld (2020-09-02 08:55:46)


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#2 2020-09-02 09:05:25

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: New Google Images Licensing Program

I posted about this about a week ago. Thanks for translating it into txp!


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2020-09-02 10:19:26

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: New Google Images Licensing Program

Kjeld wrote #325724:

Incidentally, it would be neat to have a plugin for the above code.

Or a shortcode?

Offline

#4 2020-09-03 02:01:08

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 446
Website

Re: New Google Images Licensing Program

colak wrote #325725:

I posted about this about a week ago. Thanks for translating it into txp!

Oh, that eluded my search of the forum… Incidentally, interesting thread. Thanks for sharing.


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#5 2020-09-03 02:10:16

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 446
Website

Re: New Google Images Licensing Program

etc wrote #325727:

Or a shortcode?

Thank you, I wasn’t aware of shortcodes. Looks powerful and convenient!

My spellchecker automatically changes shortcodes to shortcakes.
Quite appropriate considering how sweet this is 😉


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

Board footer

Powered by FluxBB