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 1974 posted 13 years ago by tacudtap
simple image rotation script; save as rotate.php in folder with images, call <img> to display
0 1784 posted 13 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 3765 posted 13 years ago by goo
description from title, image size from function.php (add_image_size( 'descr', 278, 200, true );)
0 1706 posted 13 years ago by shin
- Use custom image size within template (including if exist) - Add a class name to a custom image size
0 1693 posted 13 years ago by thescottlee
0 1431 posted 14 years ago by pruntrut
Wordpress by default wraps images in <p> tags, this kills that.
3 1970 posted 14 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 1486 posted 14 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 2033 posted 14 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 1777 posted 14 years ago by f6design
Checks for image files in directory and creates a XML file of the contents
0 2578 posted 14 years ago by Don_Jarmo
Remove the Attributes in <img> - Tags in the Post/Page Content
0 1312 posted 14 years ago by maxxscho
Universal WordPress function for thumbnails
0 1132 posted 14 years ago by gn_themes
this took me forever to figure out!
0 1157 posted 15 years ago by discipolo
0 1017 posted 15 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 1317 posted 15 years ago by blueocto
0 1626 posted 15 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 4990 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 2146 posted 16 years ago by el-artiste
0 2187 posted 16 years ago by eden159
5 1860 posted 17 years ago by jamesming
9 2438 posted 17 years ago by shahways
0 1592 posted 17 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 1548 posted 17 years ago by AdrianShort
Function to retrieve all image files in a given directory
0 1391 posted 18 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 2062 posted 18 years ago by gandalf
« Prev 1 Next »