Wikimedia API - How can I get all resolutions of an image - wikipedia-api

I want to copy images from a wikipedia page.
When I do it manually, I click on the picture, and then select the resolution that fits my need (width as close to 400).
Now, I am using the Wikimedia API to get the images.
But they give me only one resolution.
I saw a similiar question in Stackoverflow, but the answer was to use the iiurlwidth=400
I used it, and it does not do it (it is probably only for vector pictutres).

OK, I found that the answer to use the iiurlwidth=400 was correct, but the reply is not in the "url" item, but in the "thumburl" item,which is in the right width.

Related

Google Visually Similar Image API

I know there is this link to find visually similar images to an uploaded picture
https://www.google.com/searchbyimage?site=search&sa=X&image_url=YOUR_IMAGE_URL
but is there also a way to get an API for the first result of the visually similiar image?
I have sympathy what you need.
I try to use google cse but this is not supported similar images.
So, Next that I try, URL.
But this is able to on the browser.
I just need result of simliar images and then I wish that result is visually.
So,
you can use Vision API of Google.
This is very simple.
https://cloud.google.com/vision/

There is a question mark in my prestashop window. It wasn't there before

I just opened my store today. Before hosting firm directed my domain name to my IP there was no problem.
When I the site is activated some people wanted to change some links. I did that in a hurry maybe that caused an error. Later when I check my site I saw a big question mark on the right. I put all of the files back from my backup but the problem still exists. Is there anyone who can help me?
Thank you
FERDA
This is a missing image. Whenever an image (products, categories etc) is missing in prestashop, this question mark image is shown. It is 404.gif (or any other image format) placed in the img folder of the prestashop.
There may be two reasons to this issue:
1) At header section, it seems like you have a missing image (i think one of the social icons). This is the recommended case. Please check your images. I think it is one of the icon for social images.
2) This may be not the reason, but whenever there is some problem in the paths for images, prestashop display the 404 or question mark image. But it seems like paths are fine as other images are shown.
Proposed Solutions : First check in F12 tool (dont know what is it called :P ) that specific element i.e. right click on that question mark image and then select the Inspect Element, you will have the F12 tool opened. Check there and share the HTML code. Also please share some code before and some after that, so that it can be easily checked.

Google Custom Search API Search Image by Image URL

I am working on an application which will have an option for users to upload images. Once uploaded, the application will show other images from the web which look exactly similar, whether or not of the same size.
For this, I will create a temporary URL for the image so that I could provide Google custom search API the URL of the image. I would expect in response, URL's of images that are exactly the same or similar to it, perhaps in JSON format.
I did find a similar question posted in January. Till then Google did not support anything like this, apparently:
Google Javascript Custom Search API: Search images by image url
One can also simply do:
http://images.google.com/searchbyimage?site=search&image_url={Image URL}
Since that is not part of an official API, it may not be right to use this method.
Can someone help me?
Well, the answer quite simply is TinEye Commercial API https://api.tineye.com/welcome. I was looking in the wrong place I guess, I did not have any luck with Google Custom Search API.
Would you need a simple result?
If you are, you can 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.

Show a single thumbnail when posting on facebook

A little background info is that my team and I developed a website for a Real Estate Agency and I've been assigned the task of setting the image of the currently selected property into facebook's sharing feature.
The webpage for the property is dynamic as there are several listings, so what I've done is select the first image that is loaded on the page and set it to the og:image meta tag.
Now let's say I copy the URL and post it on Facebook, it'll show the correct thumbnail, HOWEVER, it'll also show multiple thumbnails from other listings.
All images on the website are over 200 x 200px and are within an aspect ratio of 3:1.
My question is, how do I tell Facebook to only take my initial image and not grab others while it's as it.
Is there perhaps a SelectSingleImage property that I can apply?
I've already spent more time searching for the answer to this issue than I would have liked, so thanks for any help provided, it's much appreciated.
One method I use sometimes is to recognize Facebook's server and simply provide it with different data. This way you can actually only have one image on the page (as far as Facebook knows).
I don't know anything about vb.net, but here is a simple code sample in PHP. All it does is perform a regular expression on the user agent of the request to match it against the string "facebook".
$isFacebook = false;
if(preg_match("/facebook/",strtolower($_SERVER["HTTP_USER_AGENT"]))) {
$isFacebook = true;
}
Facebook may very well change their user agent signature one day, but for now, I'm pretty sure you'll be safe but keep synced with the Developers Blog and the Roadmap.
It seems that Facebook saved those images in cache for some bizarre reason, but to resolve this issue all I had to do was enter the URL into Facebook's Linter tool which in turn cleared the cache on their server.

Prepare your site images for google image search indexing

I'm trying to understand how can I do to let my site be reachable from google image search spiders.
I like how last.fm solution, and I thought to use a technique like his staff do to let google find artists images on their pages.
When I'm looking for an artist and I search it on google image search, as often as not I find an image from last.fm artists page, I make an example:
If I search the band Pure Reason Revolution It brings me here, the artist's image page
http://www.last.fm/music/Pure+Reason+Revolution/+images/4284073
Now if I take a look to the image file, i can see it's named:
http://userserve-ak.last.fm/serve/500/4284073/Pure+Reason+Revolution+4.jpg
so if I try to understand how the service works I can try to say:
http://userserve-ak.last.fm/serve/ the server who serve the images
500/ the selected size for the image
4284073/ the image id for database
Pure+Reason+Revolution+4.jpg the image name
I thought it's difficult to think the real filename for the image is Pure+Reason+Revolution+4.jpg for image overwrite problems when an user upload it, in facts, if I digit:
http://userserve-ak.last.fm/serve/500/4284073.jpg
I probably find the real image location and filename
I see this can be done with mod_rewrite engine, but with this tecnique, will the image be highly reachable from search engines and easily archived?
My question is, does exist some guide or tutorial to approach on this kind of tecniques, or something similar?
In my opinion, the best resource for your question is Google itself.
One of the guides targets at google images search and provides some guidelines:
Don't embed text inside images
Tell us as much as you can about the image
Give your images detailed, informative filenames
Create great alt text
Anchor text
Provide good context for your image
Think about the best ways to protect your images
Create a great user experience
Source: Images - Webmaster Tools Help.
As for last.fm, one of the suggestions is:
Give your images detailed, informative
filenames
The filename can give Google clues
about the subject matter of the image.
Try to make your filename a good
description of the subject matter of
the image. For example,
my-new-black-kitten.jpg is a lot more
informative than IMG00023.JPG.
Descriptive filenames can also be
useful to users: If we're unable to
find suitable text in the page on
which we found the image, we'll use
the filename as the image's snippet in
our search results.
So yes, last.fm uses mod_rewrite to give informative filename, which google likes.
There are few more guides out there. None of them is formal, but they can help you anyway:
http://www.tareeinternet.com/forum/seo/236-optimizing-google-image-search.html
http://www.doshdosh.com/how-to-optimize-for-google-images-for-more-traffic/
http://creativebits.org/webdev/optimize_your_site_for_google_image_search
http://www.pearsonified.com/2007/01/get_53_percent_more_searches_with_one_tweak.php
The article pointed out by Tim covers most of it but I'd like to add that the title attribute on <img> tags is important too (but don't abuse it!).
To sum up:
Name your files well. apple.jpg is better SEO wise than PIC2346.jpg. For spaces in filenames use a dash (-) and not an underscore (_). See Dashes vs. underscores for more info.
Alyays fill up the alt attibute. Keep in mind that most screen readers for blind people will read this tag.
Fill the title attribute when usefull. Use a short statement describing the image. Not a whole paragraph!
The context of the image (what is the content around it) is very important too. If the image fits the surrounding contents it will give you more SEO "points".