Articles of uploads

Hook to get image filename when it is uploaded

I want to get the full local filename of an uploaded image so that I can copy it to a new directory and process it with my own image processing scripts. Which hooks/actions should I look into to achieve this? Thanks

Why are two functions over-riding each other?

I have function in my plugin that is: add_filter(‘comment_text’, ‘commentimage_comment_text’); function commentimage_comment_text($comment = ”) { $options = get_option(‘commentimage’); $id = get_comment_ID(); $images = $options[‘images’]; if (!isset($images) || !is_numeric($images)) $images = 1; $url = get_option(‘siteurl’); for ($i=0; $i<$images; $i++) { if (file_exists(ABSPATH . ‘wp-content/comment-image/’ . $id . ($i==0?”:(‘-‘.$i)) . ‘-tn.jpg’)) { $comment .= ‘<p><a href=”‘ . […]

exposing attachment uploading to the front end — delicate

i’m probably breaking a few common sense rules here. is there a way to utilize wordpress’ bake in attachment file handling for an upload form within a theme template? yes, the front end — i know. i’m creating a memorial site and i want people to be able to leave textual photographic “comments” for a […]

Can't upload media, permissions are correct

I did a manual backup and re-install of a WP site, and it worked fine. Then my client updated some plugins, regretted it and asked me to restore the site to its previous state. I used the same backup I had from the first time, but now it turns out my client can’t upload media. […]

Bulk Image Uploader to create new post from each image

Is there any plugin which creates a new post from each image I upload/select with it? I want to create many posts with one image per post. Currently I select, upload all images. Then create new post, name it same as image file name, insert image from media library and then save to draft/publish it

How to Check Disk Space used by Media Library

Is there any way to find out how much of disk space has been used by Media Library? My blog’s media files stored in a separate folder named “media” rather than the default “wp-content/uploads“. Thanks

WordPress upload file – get path to WordPress installation

I’m trying to make a script that uploads a file to a specific folder in the wordpress installation. Basically I want to upload to /uploads. However, in order to do this I need to know the server path for the WordPress installation. How can I get this?

Proper way to change the path of uploads folder for existing WordPress site

Until now I have used default WordPress directory structure, however since I started using GIT, I plan to setup WordPress as a submodule and also change the paths of upload folder. Since the path for existing images is already set in the database, is there a way to change them automatically?

Thumbnails produce unwanted gray pixels on white background

Is there a workaround for producing QUALITY “Featured Image” thumbnails of different sizes? WordPress produces compressed thumbnails that contain grey pixels where it should be a completely white background. Non-white backgrounds look okay. I am using Mac laptop if it matters. I am not using any plugins. How can I stop WordPress compression from producing […]

Is it possible to personalize the Media Library?

When we create a new post and click on Featured Image, I realize that WP creates a folder structure “year/month/image.jpg”. I’d like to change that behavior to “category_of_the_post/image.jpg” (or maybe “category_of_the_post/year/month/image.jpg”). The reason is that I want to create a different album of each “category_of_the_post” folder. I tried different plugins, but I didn’t find any […]