Skip to main content
Help Center
The GoDaddy Community will undergo maintenance starting on Wednesday, July 28th at 3pm PST / 6pm EST. Learn more
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution
realmac
New

Need HTML sample to "embed" Flickr photo

I need to "embed" a Flickr photo (which I have permission to access in this way) in a web site hosted by GoDaddy (using "Deluxe Windows Hosting with Plesk").  The HTML fragment generated by Flickr's "share" option references a Flickr java script.  The code works fine on my home computer (my development environment), but when installed in my domain hosted by GoDaddy, the script is not accessed.  I'm looking for sample code for this situation that works on GoDaddy for "embedding" individual Flickr photos.

1 ACCEPTED SOLUTION

@realmac 

 

The code from Flickr is generic and should work on ANY website / server.

 

The permissions could be that you have https for flickr and not for the site or the other way - Or the page doesn't have the right permissions on the server.

 

If you do inspect element on the page (in Chrome or Firefox) there should be a console with errors 

<a data-flickr-embed="true" href="https://www.flickr.com/photos/192675475@N07/albums/72157718895792595" title="Test"><img src="https://live.staticflickr.com/65535/51092915719_7723783243_z.jpg" width="640" height="480" alt="Test"></a><script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>

 

This code should show the photo of me from the GoDaddy Garage. One thing I just saw with a quick Google Search regarding embeds and Flickr - so if the photographer doesn't have it public it won't be seen

Uploads marked as Friends, Family, Private cannot be embedded onto other websites.
If you want to test with that code and see if it works and if not post a link so we can what is going on

 

I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

View solution in original post

5 REPLIES 5
PL281
Super User IV

@realmac 

 

Can you post a link to the page with it - That code should work anywhere it sounds like a permissions issue - being able to see the page and look at the browser console can help point you in the right direction

I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

Permissions to/from what, and where would these "permissions" live?  That's what I'm hoping to spot if anyone has a working example of a Flickr "embed" in a website hosted under GoDaddy.   I don't have permission from the photographer to show code fragment here with actual links.  I have simply wrapped the Flickr "embed" code (consisting of tags A, IMG, and SCRIPT) in an HTML FIGURE.  No other external links in this web page, except my own CSS style sheet (on same server) which also imports an external "normalize" style sheet.  In other words, there's no other scripting of any kind to interfere with the Flickr "embed" code.  The SCRIPT itself is just a link to a .js file located on embedr.flickr.com.  Does GoDaddy allow access to .js files on an external server? I have spotted some years-old mentions of a similar issue, the suggestion was that maybe substituting an IFRAME could work, but that idea seems to be stale, too -- Flickr apparently used to supply an iframe code fragment, but now does not.  There was never a clear answer, as far as I know, either from Flickr or GoDaddy.  Other advice was not to use GoDaddy at all, but again, no specific explanation of what feature on GoDaddy was getting in the way, and besides, the hosting environment has probably changed significantly since then. That's why I would like to find someone who has actually got the Flickr "embed" working, on a web site hosted by GoDaddy.  

@realmac 

 

The code from Flickr is generic and should work on ANY website / server.

 

The permissions could be that you have https for flickr and not for the site or the other way - Or the page doesn't have the right permissions on the server.

 

If you do inspect element on the page (in Chrome or Firefox) there should be a console with errors 

<a data-flickr-embed="true" href="https://www.flickr.com/photos/192675475@N07/albums/72157718895792595" title="Test"><img src="https://live.staticflickr.com/65535/51092915719_7723783243_z.jpg" width="640" height="480" alt="Test"></a><script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>

 

This code should show the photo of me from the GoDaddy Garage. One thing I just saw with a quick Google Search regarding embeds and Flickr - so if the photographer doesn't have it public it won't be seen

Uploads marked as Friends, Family, Private cannot be embedded onto other websites.
If you want to test with that code and see if it works and if not post a link so we can what is going on

 

I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

View solution in original post

Thanks so much, Phil!

The code fragment did the trick, I was able to replace it step by step with the code for the desired photo, which worked right away.  As far as I can tell, the situation yesterday -- the code worked locally, but when hosted on GoDaddy produced a broken image icon and otherwise failed to execute -- was either a performance issue or else some fluke of parsing the html file or loading Flickr's .js.  Did I inadvertently break a character string in the Flickr code fragment?  We'll never know. Now we have the answer:  Flickr "embed" works on GoDaddy at least in principle; iframe and local hosting of java have nothing to do with it.  

I think the JS is a red herring, even if the JS fails to load the image would still display (just without the branding and social media links).  Glad to hear you were able to get it working though.