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 2341 posted 13 years ago by tacudtap
simple image rotation script; save as rotate.php in folder with images, call <img> to display
0 2136 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 4306 posted 13 years ago by goo
description from title, image size from function.php (add_image_size( 'descr', 278, 200, true );)
0 2081 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 2036 posted 14 years ago by thescottlee
0 1785 posted 14 years ago by pruntrut
Wordpress by default wraps images in <p> tags, this kills that.
3 2357 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 1797 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 2412 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 2173 posted 14 years ago by f6design
Checks for image files in directory and creates a XML file of the contents
0 2972 posted 14 years ago by Don_Jarmo
Remove the Attributes in <img> - Tags in the Post/Page Content
0 1673 posted 14 years ago by maxxscho
Universal WordPress function for thumbnails
0 1449 posted 15 years ago by gn_themes
this took me forever to figure out!
0 1427 posted 15 years ago by discipolo
0 1285 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 1648 posted 15 years ago by blueocto
0 1988 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 5524 posted 16 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 2522 posted 16 years ago by el-artiste
0 2558 posted 17 years ago by eden159
5 2303 posted 17 years ago by jamesming
9 2860 posted 17 years ago by shahways
0 2001 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 1908 posted 18 years ago by AdrianShort
Function to retrieve all image files in a given directory
0 1732 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 2502 posted 18 years ago by gandalf
« Prev 1 Next »