safe_image.php changes picture url - image

When using FB/sharer/sharer.php Im running into problems with my TYPO3 installations as no picture are found. Or better, pictures are found but safe_image.php does not use the correct URL when trying to download them.
In Firebug I noticed FB does following:
safe_image.php?d=XYZ&url=http%3A%2F%2Fwww.my-domain.com%2Fen%2Ffileadmin%2FmyPicture.jpg
which fails because the real path is
safe_image.php?d=XYZ&url=http%3A%2F%2Fwww.my-domain.com%2Ffileadmin%2FmyPicture.jpg
Any idea why there is an /en added? The website has multiple languages (changed by domain.com/en or domain.com/de) but all images could be found under domain.com/fileadmin/...
When using og meta tags it works nice, but we want the user to choose the picture he would like to share.

Facebooks is not able to use relative links with base tag. Which is bad.
Solution is to use absolute URLs (config.absRefPrefix).
Related bug tracker issue: http://bugs.typo3.org/view.php?id=18121

Related

Official image host for GitHub projects?

Whenever I need to include a picture in a GitHub project's README file I usually just stick it in a Screenshots folder and relatively link to it. However this unnecessarily bloats the file size of the project, especially if I include an animated .gif of the project in action.
I've noticed in a couple popular Github iOS projects (like MMDrawerController and JASidePanels) that the images are NOT relatively linked, but rather they exist on a domain I've never seen - "https://github-camo.global.ssl.fastly.net". Navigating to this site directly doesn't work and Google searches bring up nothing. So for my question: is this site affiliated with GitHub, and how does one get his/her images uploaded here? Of course I could always use a generic image hosting service but I'd prefer to use one that has official ties with GitHub (if such a site exists).
Where is this?
GitHub itself has a "secret" feature to upload images.
I read about this in a comment by GitHub's own Phil Haack:
I edit (or create) an issue and drag it into there and copy the resulting markdown into my post. It's probably an abuse of GitHub issues.
If you do it like this, the image will be stored on some GitHub server, and it will have a URL like this one:
https://f.cloud.github.com/assets/19977/1656110/a3f8b280-5b6d-11e3-818d-c06ab05bd613.jpg
Fastly is not an image host, it's a content delivery network. See their website and this CDN Planet entry.
If you peek at the source code of the README.md page in the MMDrawerController repository, you'll notice that the image aren't initially stored at Fastly.net.
Moreover, they're supposed to be served through standard http (ie. not https).
<p align="center" >
<img src="http://mutualmobile.github.io/MMDrawerController/ExampleImages/example1.png" width="266" height="500"/>
<img src="http://mutualmobile.github.io/MMDrawerController/ExampleImages/example2.png" width="266" height="500"/>
</p>
The links your refer to are dynamically rewritten thanks to the Camo tool.
This tool simplify routing images through an SSL host in order to prevent users from being warned by their browser about potential unsecure content as every GitHub.com content is being served over https.
I built MMDrawerController. I host the images in a gh-pages repo and link to them from the README.
No you don't need a host. just put images in root of your own project and give link in readme.md
something like this
![Preview1](./img1.PNG)
![Preview2](./img2.PNG)
## and so on
Follow these steps to host the image on GitHub's official website.
Visit any repository on GitHub and click your way through to the issues.
Create a new issue by clicking the New Issue button. You'll now see the title and description fields.
Drag and drop an image onto the description field. This will start the uploading process.
Copy the URL and use it in README, issues, or pull requests however you like.
Demonstration of how it works:
Simply open the image you wish to post on GitHub, right-click, Copy Image, then in the Github post, hit ctrl-v.

Google similar image search API

I'm trying to find out if there is a way to do google similar image searches via an API?
I know the image search api is depreciated but is it still useable?
https://developers.google.com/image-search/
Also... It seems that you can do image searches with the custom search api but I can't seem to work out if a similar image search is possible.
http://thenextweb.com/dd/2012/02/14/googles-custom-search-api-now-supports-image-only-results/
Any leads on advice on working this our would be appreciated.
Thanks!
If you have a URL for a hosted image (using Dropbox, imgur, etc), the answer at https://stackoverflow.com/a/15134958/116891 shows you how to find similar images. Basically,
http://images.google.com/searchbyimage?image_url=YOUR_HOSTED_URL
That is deprecated.
But I need JSON format of similar images result.
So, I try to use google cse but this is not supported searching of similar images.
It's just displayed image search results in a custom domain.
Another method that i try is URL.
http://images.google.com/searchbyimage?image_url=YOUR_HOSTED_URL
But this is not solution what i need.
It is because able to use in the browser. I need JSON.
Conclude, I decide to use Vision API of Google.
This is very simple.
https://cloud.google.com/vision/
You can try on the top.
First, access the URL.
Second, upload your image file on the "Try API".
Third, click "JSON" tab menu on the result.
You can be seen JSON about similar images.

Redirect All Google Images Hotlinking To Page Containing Image?

I have a website that mostly contains images. I would like to redirect all jpg/gif/png links that appear in Google Images when someone clicks "View Original Image" to the post containing the image. Is there a way to do this in .htacess using mod_rewrite?
Google Images now just has an expanding wrapper containing a larger version of the image. It no longer gives you a preloaded "preview" page, the reason being to prevent redirection. As far as I know, this cannot be done. However ,you can prevent your image from appearing in Google Search.
If you are using Wordpress, something like the Imaguard plugin should do the job. And if you're not using WP at least you can download the source code here
http://wordpress.org/extend/plugins/imaguard/
And see how they did it. Seems to be checking for referrer and if not on their white list or local referrer, they redirect to an image with text over . Probably using GD plugin to add text on the fly.

Multilanguage website crawling issue (links like en/en/...)

I've created a multilanguage website and I tried to generate a sitemap with a common Sitemap Online Generator.
Unfortunally it crawled links like "en/en/..." or "it/de/en/..." (that not exist and are not correct of course). I'm afraid that Google could do the same.
I read all about tag (maybe the problem is there) and did lots of trying, but the resutl is always the same: lots of redundant links (en/apartments/en/apartments/torre)
Any suggestions?
Solved!
I wrote my problem to the sitemap generator webmaster. It was an error about its tool (it doesn't consider singular apices around base-tag's attribute).
I sent the sitemap to google and everything was ok.

Mediawiki can't display images or styles

I`m using MediaWiki v1.19.1.
My wiki works well when I use it locally.
But when I access it over the network (from another computer, or a different IP),
it displays the text only. There are no images.
It seems like a classic skin but it`s not.
The reason is that there is no layout on my wiki (other public wiki pages show ok).
My wiki uses the monobook skin now, but I can see only the text on the page.
I have changed the permission to 777, including on all directories (/var/www/kj/*),
but still no images.
Help me, please...
I got the same issue some time ago and the following worked fine for me.
The issue might be related to the LocalSettings.php file and the general setting $wgServer.
The following link can provide you more details : Manual of $wgServer
Since 1.18 MediaWiki has also supported setting $wgServer to a protocol-relative URL.
eg, //www.mediawiki.org
This is used for supporting both HTTP and HTTPS with the same caches by using links that work under both protocols.
So try removing localhost and provide your URL; eg ; $wgServer = "//mywebsite.com";
There's not enough information to give a definite answer, however general recommendations for such situations are:
If you're using any Apache rewrite rules (for example, to make URLs prettier), try disabling them.
Especially if you're using the http://example.com/Page_title style URLs, you should know that they're unsupported by the developers and require serious MediaWiki/Apache skills (and even then they will likely introduce subtle bugs).
Install Firebug and check what's the HTTP error for your images: is it because access is denied (HTTP 403) or the webserver doesn't see them at all (HTTP 404) - this should give you an idea what's going on.

Resources