Tag Info

New answers tagged

0

You have the browse button and the import button in two different HTML form elements. Don't do that, put them in the same <form>.


3

Actually WordPress reduce quality of image when you upload it via media uploader. WordPress has built in compression for JPG images. Whenever you upload an JPG/JPEG image to WordPress media library, WordPress will automatically compress your images to 90% of the original quality, this is intended to help your pages load faster and keep file sizes smaller. ...


0

Normally this might due to some discrepancy from default set values for image in functions.php in wordpress and check whether any default values is set for the images in that file. You also can set it manually in function.php file as below. add_theme_support('post-thumbnails'); update_option('thumbnail_size_w', 200); update_option('thumbnail_size_h', 200); ...


0

I think php version is issue , Add following code to .htaccess and then try to upload : AddType x-mapp-php5 .php AddHandler x-mapp-php5 .php


0

after change your memory limit , open your web page in some other browser or delete all your history and cache values in your browsr,,,,


0

Victor, Maybe this is helping you. http://goo.gl/9sahyp Regards, Hugo


1

The Memory Limit depends on WP_MEMORY_LIMIT set by Wp_config file .So u can change the limit To higher value but Everything Depends on your Server Specifications.


0

You have to set Increase your memory limit in wp-config.php. define( 'WP_MEMORY_LIMIT', '64M' ); define( 'WP_MAX_MEMORY_LIMIT', '256M' ); Increase the maximum execution time (max_execution_time) in your php.ini file. or in .htaccess php_value max_execution_time Or I think go for drupal where good module available like this


0

'apply_filters' runs the value through all of the other hooks / functions attached to it. Try an experiment: print_r( $type ); print_r( apply_filters("{$type}_upload_directory", $type) ); While you might, in your case, get the same thing - the apply_filters makes sure that any other plugins that try to influence this upload directory will still work.


0

The post that an attachment is related to is determined by the post_parent column on the wp_posts table (depending on your database prefix). Set it to the post_ID of the parent post.


0

I like to use the following: First I initiate an array of supported mime types: $supportedTypes = array( 'application/pdf' ); Next I get my actual uploaded file type: $fileType = $_FILES['type'][0] Then I use wp_check_filetype() to get the extension and mimetype: $fileArray = wp_check_filetype( basename( $_FILES['name'][0] ) ); Finally I run a ...


0

lurie add below condition... if ( $type == $imagetype ) { // write code for reduce .jpg/.jpeg files size or call function here }


0

I use define('UPLOADS', 'wp-content/folder'); in my config.php file right under require_once(ABSPATH.’wp-settings.php’); You can try to change the folder to something like %postname% define('UPLOADS', 'wp-content/%postname%');


0

Something like this may do the trick, just change mycpt as you like add_filter('upload_dir', 'mycpt_uploaddir'); function mycpt_uploaddir( $param ){ global $typenow; if ('mycpt' != $typenow) return $param; $mycpt = '/mycpt'; $param['path'] = $param['path'] . $mycpt; $param['url'] = $param['url'] . $mycpt; return $param; } ...


1

The hook for doing stuff after an upload is the reset event on wp.Uploader.queue triggered by the pluploader when it's finished (see line 249 in "wp-includes/js/plupload/wp-plupload.js"). Here's one hack to use this to do an auto-insert after an upload: function wpse167143_admin_footer() { ?> <script> jQuery( document ).ready(function() { ...


0

Sorry for format of my code. Please any one help me to edit this code format. " Use below code in function file in your theme. After that it will display an option in Admin> appearance>Homepage below image 1 . From there you can upload image." function register_my_logo(){ register_setting('logo_options_group','logo_options_group'); }add_action( ...


0

My solution was to replace the following in image-rotation-repair.php $image = _rotate_image_resource( $image, $orientation ); with $rotated = imagerotate( $image, $orientation, 0 ); if ( is_resource( $rotated ) ) { imagedestroy( $image ); $image = $rotated; } Note: Usually, modifying a plugin's code is a bad solution, but in this particular ...


0

You can do this without a plugin in the newest versions of Wordpress. Go to Media, click on any image and then click on the edit image button. You can edit the image there and one of the options is rotation.



Top 50 recent answers are included