![]() ![]() I’ve set my cron to delete all images over 150kb. (This will restrict opening your original uploaded image in a lightbox when you click on it – this is important since you will be deleting the original in the next step)ģ) Lastly, setup a cron, maybe once a week, to delete all files over a certain size in the bpfb folder (this is the folder where all the uploaded & thumbnail images are stored) (I’ve chosen 640×640 for the maximum thumbnail size, since lightbox is lost)Ģ) Go to your plugins\buddypress-activity-plus\lib\forms folder and edit the images_tag_template.php file and delete this section: ” class=”” rel=”” > If someone wants to help & co-build a PHP script with me please let me know (or if someone has a better overall solution)Īnother solution which is easier and works perfect (but you lose the lightbox feature)ġ) Increase the thumbnail size by adding this line to your wp-config file: define(‘BPFB_THUMBNAIL_IMAGE_SIZE’, ‘640×640’) In my situation I don’t really mind, but to make this solution better, I am working on a PHP script to SKIP files that have already been resized and re-compressed… but this is the solution I’m using right now and it works. Works perfect, with one drawback: This solution will keep re-compressing files that have already been resized)… So if I set cron to resize once a week, it will recompress the file 52 times a year. ![]() (This will look at the directory and resize all jpegs image to 800×800 and not increase (blow up) images that are smaller). Here is my current solution:Ģ) Set up a cron job with the following command: cd “public_html/wp-content/uploads/bpfb/” & mogrify -strip -resize 800×800\> *.jpeg *.jpg ImageMagick: resize image and reduce file size. You can edit the Activity Plus code to limit the upload size, but this will soon become a massive hassle for users to reduce file sizes on their own (especially if a user wants to snap a shot with their mobile phone and upload to the activity stream). It is still possible that your file cannot be reduced in size because it is already stored with the best compression. Can someone help Made a bannergenerator for my work, that uses ImageMagick. I can only reduce it to a 64 KB GIF, but this is to much. It has 28 KB and looks gread This animated miff is produced by ImageMagick. That means that a user can upload a 10MB image file and it will stay on your server as a 10MB file in the ‘bpfb’ folder. This animated gif is produced by Fireworks. convert -strip -quality 90 big-image.jpg new-image.jpg. So, I asked her to run this command: Code: Select all. However, due to its current design, it allows uploads of any image size that stays there. She needs to get that file down to 10MB or so, without losing image quality (if thats at all possible). Last edited by CiaW 12th March 2010 at 05:45 AM.The BuddyPress Activity Plus plugin is a must have add-on for BuddyPress in my opinion. Save your result and then use your file browser to find the new file size - at least that's what I did. When you're in the main gimp window with the image open it'll have a file size, or some sort of size it's not accurate as far as file size though. You can also then change the resolution underneath that. (If you want to change the proportion, you'll have to unlink the chain beside the pixel dimensions.) you can also select percent, inches (centimeters), or points instead of pixels if you want. ![]() Select open, then when it's on the desktop, select >image > scale image and it'll let you select a new dimension in pixels (you probably want to copy the original image first!), if you just enter the new smaller width, and tab or enter it'll automatically re-do the length to keep the scale in proportion. I then reduced the jpg of 385x588 pixels to 70x107 pixels at 3kb size. jpg, then when I opened the jpg it tells you right on right side of the screen (preview) the image size and pixels. gif file from 68kb to 40.4kb by opening it and saving it as a. I just happened to do exactly what you're asking last night in Gimp, though I reduced a. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |