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 121 posted 7 years ago by tacudtap
simple image rotation script; save as rotate.php in folder with images, call <img> to display
0 134 posted 7 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 229 posted 7 years ago by goo
description from title, image size from function.php (add_image_size( 'descr', 278, 200, true );)
0 96 posted 7 years ago by shin
- Use custom image size within template (including if exist) - Add a class name to a custom image size
0 121 posted 8 years ago by thescottlee
0 62 posted 8 years ago by pruntrut
Wordpress by default wraps images in <p> tags, this kills that.
3 97 posted 8 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 74 posted 8 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 123 posted 8 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 93 posted 8 years ago by f6design
Checks for image files in directory and creates a XML file of the contents
0 94 posted 8 years ago by Don_Jarmo
Remove the Attributes in <img> - Tags in the Post/Page Content
0 62 posted 8 years ago by maxxscho
Universal WordPress function for thumbnails
0 53 posted 9 years ago by gn_themes
this took me forever to figure out!
0 63 posted 9 years ago by discipolo
0 50 posted 9 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 75 posted 9 years ago by blueocto
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 204 posted 10 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 142 posted 10 years ago by el-artiste
0 135 posted 11 years ago by eden159
5 69 posted 11 years ago by jamesming
9 85 posted 11 years ago by shahways
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 70 posted 12 years ago by AdrianShort
Function to retrieve all image files in a given directory
0 80 posted 12 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 115 posted 12 years ago by gandalf
« Prev 1 Next »