This is a sandbox inspired by Google Hacker Johnny Long where I mess around with Google stuff.
Force Google Safe Image Search
Offensive queries passed through the box below should not return explicit results back in Google Image Search, as it enforces a “Safe Search” with Google.
Why?
Imaging you run a fairly liberal network, where relatively young users are allowed access to the internet (categorically filtered by OpenDNS). You can divert queries to a specific page on your network that enforces the ‘Safe Search’ toggle to ‘Strict’. Although it can be ‘untoggled’ in the interface afterwards, this method should suffice short of enforcing profile cookies. Bleah.
How?
The code below creates a basic form that, when queries pass through, they get appended with “&safe=active” at the end of the search:
Give Options For Specific Image Results
Return only high-quality images
Why?
Quality control
How many pixellated PowerPoint presentations and printouts have you had to bear witness to? Google’s Advanced Image Search provides all the options for fine-tuning an image search to look for 10 megapixel pics with re-use licenses, etc. Providing these options up front helps your network users just get on with it.
The following code passes a value to only return images of 1024×768 pixel resolution and above:
Note that safe search is still enabled.
Creative Commons
We might also want to make sure that the image results we get back have been properly labeled for re-use through a Creative Commons license:
So the following bit of code only brings back images that are labeled for re-use