Articles of uploads

Change the size of the image preview on the media edit page

I’d like to increase the size of the preview image on the media edit page. At the moment it’s too small to accurately crop. ../wp-admin/post.php?post=2758&action=edit&image-editor

Using wp-uploads instead of wp-content/uploads

What is the difference between the wp-uploads directory and the wp-content/uploads directory? I am running Ubuntu Server 12.04 and recently installed WordPress using apt-get, but there have been a few problems. Most of the install went into /usr/share/wordpress including a wp-content directory, but inside that, there is no upload directory. Instead, in /srv/www there is […]

Where does wordpress store the FTP credentials?

When wordpress asks for FTP information to upgrade, you type it in and then it seems to store it for future use (for future upgrades, and maybe also for media uploads?) Where does it store these details? Is it in a file? In the database? I’m trying to figure out what information is being used […]

resize images not crop

Looking for a hack to resize images on upload (all forms of image uploads on wordpress) to exact dimensions, but not to crop. I will open a bounty for this question since I believe It can be of help for a lot of people. The ideal solution must be as a plugin and using the […]

Disable gallery in 3.5 media iframe

I’m creating a setting to set a logo. It works but there is a problem. I only need one image to be set so the gallery item should be disabled / hidden. Of course this should only effect this page, of even better this setting. <?php // above this I do a simple settings api […]

Make attachment pages require a base url

If I upload an image with the filename 8.jpg then the permalink becomes http://www.example.com/8 — which I really don’t want. How can I make attachments use their mime type as a base for the url? http://example.com/image/8? add_action(‘init’, function(){ add_rewrite_endpoint( ‘media’, EP_PERMALINK | EP_ATTACHMENT| EP_PAGES ); flush_rewrite_rules(true); } ); I’m not really sure how endpoints work […]

insert post & Upload post thumbnail from the front end using ajax

i have searched & searched for an explenation and have found some answers that seem to be working for other people on this topics but i havent been able to get working. This is my “form” <div id=”uploadPatternForm”> <div class=”rightCol fleft w30 ml2″> <h4><?php _e(‘Your Info’, ‘sagive’); ?></h4> <input type=”text” name=”senderName” id=”senderName” placeholder=”Your Name” /> […]

Filter to modify post_title after image upload?

When I upload images, WordPress 3.4.2 sets the Title to the base of the filename, such as “DSCN1234” or “IMG_1234”. I’d like the Title to be left blank. The code that sets the Title during the upload seems to be in “wp-admin/includes/media.php” in the function media_handle_upload(), here: // Construct the attachment array $attachment = array_merge( […]

Uploading images: 'ø' get replaced with 'ø'

So, I have 2 sites. One in production, and the another in development. They have the same content and uploads. In production, images with names containing æ, ø, or å gets the character replaced with something else, for example ø get replaced with ø, and then saved in the upload folder. And it works! WordPress […]

Upload folder is not writable, even when permissions are correct

I recent migrated my site from Godaddy to Webfaction. On migration, I get this error: Upload folder is not writable. Export and file upload features will not be functional. Naturally, I check the permissions of the folder – and they are correct. Just to be safe, I changed it recursively to “777” (as a test, […]