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 874 posted 11 years ago by tacudtap
simple image rotation script; save as rotate.php in folder with images, call <img> to display
0 877 posted 11 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 1415 posted 11 years ago by goo
description from title, image size from function.php (add_image_size( 'descr', 278, 200, true );)
0 878 posted 11 years ago by shin
- Use custom image size within template (including if exist) - Add a class name to a custom image size
0 804 posted 11 years ago by thescottlee
0 626 posted 12 years ago by pruntrut
Wordpress by default wraps images in <p> tags, this kills that.
3 862 posted 12 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 653 posted 12 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 874 posted 12 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 776 posted 12 years ago by f6design
Checks for image files in directory and creates a XML file of the contents
0 817 posted 12 years ago by Don_Jarmo
Remove the Attributes in <img> - Tags in the Post/Page Content
0 539 posted 12 years ago by maxxscho
Universal WordPress function for thumbnails
0 473 posted 13 years ago by gn_themes
this took me forever to figure out!
0 535 posted 13 years ago by discipolo
0 438 posted 13 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 622 posted 13 years ago by blueocto
0 716 posted 13 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 2691 posted 14 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 1166 posted 14 years ago by el-artiste
0 1133 posted 15 years ago by eden159
5 738 posted 15 years ago by jamesming
9 637 posted 15 years ago by shahways
0 742 posted 15 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 600 posted 16 years ago by AdrianShort
Function to retrieve all image files in a given directory
0 601 posted 16 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 933 posted 16 years ago by gandalf
« Prev 1 Next »