I need a module that permit to my editor user to choice photo from instagram and linked them in a field of a content type.

I have found https://www.drupal.org/project/instagram_feeds but I don't want to create feeds for every node.

Edit: and if possible a youtube module too. ("Youtube" module permit to write video's url, but not a graphical choise). Thanks.


Firstly user will have to authenticate to their Instagram account. Then the user can access his personal photos via the end-point /users/self/media/recent. You will have to write some code to achieve this. The authentication part can be achieved using the HybridAuth module. Then you'll have to implement your own interface to search content.

This is if you want the user to first see a list of photos and then choose from it. If you just want to embed from url, you can use this module along with the media module.

Its also important to note that Instagram API no longer permits public scope, and you can only search your own images.

With respect to youtube, Media module along with Media: Youtubemodule allows you to add youtube video from a link. You can then set the video player or thumbnail settings from the display settings. However, by default, there is not out of the box solution to search for youtube video graphically and then add it to Drupal.

However, adding this on top of Media Youtube field won't be very hard. Quick js around this form could solve the issue. See to quick js based youtube search below:

  1. https://codepen.io/timivey/pen/jEXxZY
  2. https://www.w3tweaks.com/youtube/search-youtube-videos-using-youtube-v3-api-using-jquery-ajax-call.html (Click on Demo)

You can use the Drupal Form Alter and Form attached options to add the necessary JS and CSS to the form.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.