Skip to content

Instantly share code, notes, and snippets.

Jan Fabry janfabry

Block or report user

Report or block janfabry

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@janfabry
janfabry / virtual-intermediate-images.php
Created Nov 13, 2010
WordPress Virtual intermediate images plugin (first public attempt)
View virtual-intermediate-images.php
<?php
/*
Plugin Name: Virtual intermediate images
Plugin URI: http://www.monkeyman.be
Description: Prevent creation of actual intermediate image sizes
Version: 0.1
Author: Jan Fabry
This plugin prevents the creation of actual intermediate image sizes. It does, however, fill in all metadata attributes as if the intermediate sizes exist. It is designed to work together with a plugin that can create these images on the fly, like monkeyman-on-demand-resizer.
@janfabry
janfabry / on-demand-resize.php
Created Nov 13, 2010
WordPress On-Demand image resizer plugin (first public attempt)
View on-demand-resize.php
<?php
/*
Plugin Name: On-Demand image resizer
Plugin URI: http://www.monkeyman.be
Description: Create and store images in different sizes on demand
Version: 1.0
Author: Jan Fabry
This plugins monitors 404 requests to the uploads directory and created new images of a requested size. They are saved as new files in the upload directory, not cached somewhere, so future requests are served directly by the server. This allows you to eliminate the creation of intermediate image sizes [see monkeyman-virtual-intermediate-images] or resize images based on the size used in the editor [see monkeyman-resize-image-tags].
@janfabry
janfabry / fixed-image-cropper.js
Created Dec 2, 2010
WordPress Fixed Image Cropper
View fixed-image-cropper.js
// pxi: pixels in image scale
// pxc: pixels in crop scale
// Helper function to create an element with optional attributes
// Doesn't jQuery already have this?
Monkeyman_FixedImageCroppper_createElement = function(tagName, attr)
{
if (!attr) {
attr = {};
}
@janfabry
janfabry / wpse17728.php
Created May 19, 2011
Dump WP image resize information
View wpse17728.php
<?php
/*
Plugin Name: WPSE 17728
Plugin URI: http://wordpress.stackexchange.com/questions/17728/large-image-size-is-cropped-not-proportional
Description: Large image size is cropped, not proportional?
Author: jimilesku
*/
add_filter( 'intermediate_image_sizes_advanced', 'wpse17728_intermediate_image_sizes_advanced' );
function wpse17728_intermediate_image_sizes_advanced( $sizes )
@janfabry
janfabry / vote-groups.php
Created Mar 30, 2011
See which triplets of candidates were most frequent in the WPSE moderator election
View vote-groups.php
<?php
$ballots = array(
array(1, 2, 3),
array(2, 4, 1),
array(5, 1, 4),
array(4, 2, 5),
array(1, 2, 4),
array(5, 4, 2),
array(6, 4, 5),
array(4, 1, 5),
@janfabry
janfabry / resize-img-tags.php
Created Nov 13, 2010
WordPress Resize img tags plugin (first public attempt)
View resize-img-tags.php
<?php
/*
Plugin Name: Resize img tags
Plugin URI: http://www.monkeyman.be
Description: Change image src's based on width and height specified in tag
Version: 0.1
Author: Jan Fabry
This plugin rewrites <img> tags so that the src contains width and height information. It is supposed to be used together with a plugin that can generate these resized images on the fly, like monkeyman-on-demand-resizer.
You can’t perform that action at this time.