Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged images



« Prev 1 Next »
If you are using the [TimThumb](http://code.google.com/p/timthumb/ "TimThumb on Google Code") script with a URL the contains tildes (~) and images are breaking, here is the fix... I did not create this snippet but found it extremely useful so I th...
0 1413 posted 12 years ago by tacudtap
simple image rotation script; save as rotate.php in folder with images, call <img> to display
0 1338 posted 12 years ago by goddess
Here is a set of functions that can be very useful: Give this script the url of a webpage, and it will save all images from this page on your server.
1 2296 posted 12 years ago by goo
description from title, image size from function.php (add_image_size( 'descr', 278, 200, true );)
0 1341 posted 12 years ago by shin
- Use custom image size within template (including if exist) - Add a class name to a custom image size
0 1278 posted 13 years ago by thescottlee
0 1053 posted 13 years ago by pruntrut
Wordpress by default wraps images in <p> tags, this kills that.
3 1333 posted 13 years ago by rliverman
This is an example of omitting the width and height attributes from a thumbnail img tag in Wordpress. Useful if you are working on a responsive design. Use inside The Loop.
0 1085 posted 13 years ago by f6design
Add this snippet to your Wordpress theme's functions.php file to reject any image uploads that are below the specified dimensions.
2 1400 posted 13 years ago by f6design
This snippet adds support for post thumbnails (a.k.a. 'featured images') to a Wordpress theme. It also adds an additional image size for image thumbnails, hard cropped. This second step is optional. Add this snippet to your WP theme's functions.ph...
1 1255 posted 13 years ago by f6design
Checks for image files in directory and creates a XML file of the contents
0 1406 posted 13 years ago by Don_Jarmo
Remove the Attributes in <img> - Tags in the Post/Page Content
0 974 posted 13 years ago by maxxscho
Universal WordPress function for thumbnails
0 860 posted 14 years ago by gn_themes
this took me forever to figure out!
0 874 posted 14 years ago by discipolo
0 778 posted 14 years ago by anhonestboy
Put your images in a folder called 'random' in your ROOT directory. Please this script at the top of your page:
1 1029 posted 14 years ago by blueocto
0 1189 posted 14 years ago by newsok
This simply php function will retrieve the links of the images from Google Images searched with a keyword. The function just calls images.google.it and parse the html to find the url of the images, in this case the urls are stored in the javascript,...
0 3696 posted 15 years ago by ginoplusio
This snippet is just an upgrade to the "http://snipplr.com/view/7396/php-file-extension-case-changer/" code. This particular code works on image files... although you can just change this line [if (preg_match("/(jpg|gif|png|bmp)/",$ext)) ] to target...
0 1705 posted 15 years ago by el-artiste
0 1666 posted 16 years ago by eden159
5 1295 posted 16 years ago by jamesming
9 1250 posted 16 years ago by shahways
0 1242 posted 16 years ago by iTony
The lazy way to generate XHTML-valid width and height attributes for your images. This is incredibly inefficient, though I believe (ref?) that calls to getimagesize() are cached.
2 1041 posted 17 years ago by AdrianShort
Function to retrieve all image files in a given directory
0 1023 posted 17 years ago by coggla
These two functions allow you to remove images from html page. The function returns an array of images with the absolute src and,if there are any, the alt and title attributes. Arguments to pass to get_images() are $file = html source and $url = th...
3 1530 posted 17 years ago by gandalf
« Prev 1 Next »