In the folder <Installation Path>/wp-includes/ there is a file called functions.php, inside this file there is a function called get_allowed_mime_types().
This function is in charge of defining an Array of mime types keyed by the file extension with a regex corresponding to those types.
So in order to add a new file-type to the white-list you just have to add a new line with the following format in the list:
'jpg|jpeg|jpe' => 'image/jpeg',
Where, on the left you define the extensions you want to be accepted separated by the vertical bar character (“|”) and on the right you give a file definition.
Lets say you have a ton of pictures or photos that you want to resize and add a semi-transparent label at the bottom of this bulk of files and even rename them using a pattern based on a unique number. You can either do this manually or by using imagemagick.…
ufraw converts camera RAW images to standard image files (like jpeg). Using the ufraw-batch we can massively convert the images in a folder in one call without the need of external scripts to invoke each separate call. ufraw-batch --out-type=jpeg --out-path=./ ./*.NEF In the above example we set the output type…
Like many of you, sometimes we develop code that does not belong to a Git server. Working as so, one would think that we would miss all the features of a Version Control System (VCS). Fortunately, this assumption is wrong. Using the already installed Git tools, we can create a…