Convert Image All

Convert Image All 6.8

No permission to download
Compatible XF 1.x versions
  1. 1.2
  2. 1.3
  3. 1.4
  4. 1.5
Description:

The Convert Image All add-on will convert hot linked images to attachments.

The hot linked image will be replaced by a full size inline attachment.

(hot linked image)

pic001.webp


(attachment)

pic002.webp


This add-on is designed to convert all existing hot linked images contained in all posts. It should also be used every few months to verify there are no hot linked images on your forum.
Note: Although not required, in addition to this add-on, it's advised to install the Convert Image add-on located here:

http://xenforo.com/community/resources/convert-image.2521/

The Convert Image add-on will convert hot linked images immediately after a message is saved.

Features:
  • Images resized using ImageMagick for highest quality.
  • Images resized to maximum width and height settings in Admin Control Panel (Options -> Attachments).
  • Image Proxy images are converted to attachments.
Requirements:

Must have ImageMagick PECL Extension installed on your server. Check if you can select this:

Admin Control Panel -> Options -> Attachments -> Default Image Processor -> ImageMagick PECL Extension

If you're not able to select ImageMagick PECL Extension, contact your web host and ask them to install it.

XenForo Control Panel Requirements:

This add-on requires a restricted Maximum Attachment Image Dimensions setting. You cannot use 0 or blank as an option. I use the 1600 x 1600 on my forum.

pic003.webp


Admin CP -> Home -> Options -> Attachments

Installation:
  1. Download convertimageall_v6.8.zip and unzip it.
  2. Upload the Andy folder to your server. The correct location will be library/Andy.
  3. From your Admin Control Panel, go to the "Install Add-on" page.
  4. Upload the addon-ConvertImage_v6.7.xml file.
  5. Click the Install Add-on button.
Options page:

pic004.webp


Cron Entry:

This optional feature is used on forums with many posts, it automates the Convert Image All process. Once all posts have been converted please uncheck this Cron Entry option.

pic005.webp


User Group Permissions:

Set the Administrative User Group Permissions to "Allow".

pic006.webp


Operation Step 1:

Add "convertimageall" to the end of the URL in your browser.

Examples:
Code:
Full Friendly URLs
http://www.domain.com/convertimageall
http://www.domain.com/forums/convertimageall

non-Full Friendly URLs
http://www.domain.com/index.php?convertimageall
http://www.domain.com/forums/index.php?convertimageall

At this point you will see the following:

pic007.webp


Operation Step 2:

To convert hot links images, click the "Update 1 posts" link.

At this point you will receive a confirmation "Update successful" message.

Press the back button. At this point it will appear as nothing has happened because you are looking at a cached page, if you reload the page you will see the next post number to convert.

Once you have verified the add-on is working correctly, you can increase the Limit in the Options, then reload the page. For example you can set the Limit switch to 1000, however note setting the Limit switch to a very high number will result in timeout errors. Click the "Update posts" link and 1000 posts will have hot linked images converted to attachments.

Operation Step 3 (Optional):

To run this add-on automatically every 10 minutes, go to the Cron Entry in your Admin Control Panel and enable the Convert Image All entry.

There is a table called xf_convert_image_all which stores the last post ID the add-on has processed.

The Cron Entry will start with the first post and continue until the last post has been processed. Be sure to set the Limit in the Options page to a higher number like 1000 so each 10 minutes 1000 posts will be processed.

If for any reason you want the Cron Entry to start over again, you can edit the xf_convert_image_all table and change the post_id field to any post number you want the Cron Entry to start from.

Add 'convertimageall' to your URL to check the progress of the Cron Entry:

pic008.webp


The Cron Entry will be completed when the Cron Entry Post ID is close to the last post ID in your forum, note you do need to reload the page to get the latest post ID that was processed. Use phpMyAdmin to determine what is the last post_id of your forum, look at the xf_post table.

The Cron Entry creates a lock_file in the temporary image directory, this will ensure the Cron Entry can only run one instance at a time.

Question and Answers:

Q: Some hot linked image are not converted, why is this?​
A: If a hot linked image is either too small, too large, or the dimensions are not able to be read, those images are not converted and will require manual conversion.​
Q: Why isn't GD supported?​
A: GD does a terrible job of creating large images.​
Q: Can files in the /tmp/ directory be deleted?​
A: Yes.​
Q: Why doesn't this add-on remove dead hot linked images?​
A: I have not added that function because the danger of losing data is too great. It's best that posts with dead hot linked images be edited or deleted so you have quality content on your forum.​
Q: Does this add-on support XenForo Image Proxy?​
A: Yes​
Q: If I run the Cron Entry I get a message "Exit, lock_file found." displayed.​
A: This occurs when the Cron Entry is run and there's an error, the lock_file is not properly deleted. You need to manually delete the file called "lock_file" from the /tmp/ folder.​
Q: I use a database cache and the add-on is asking me to disable it, why?​
A: A database cache can cause duplicate attachments to be created.​
Q: Should I disable Image Proxy before running this add-on?​
A: No. You should disable Image Proxy after the add-on has converted all hot linked images to attachments.​

Sending a donation:

If you like this add-on, please consider sending a small donation.

https://www.paypal.me/andybajka

Thank you.
Author
AndyB
Downloads
729
Views
5,392
First release
Last update

Ratings

4.96 star(s) 28 ratings

More resources from AndyB

Latest updates

  1. See description

    Convert Image All v6.8 changes: Added code to bypass photobucket hot linked images.
  2. See description

    Convert Image All v6.7 changes: Updated PHP code. Fixed issue with undefined index.
  3. See description

    Convert Image All v6.6 changes: Fixed problem dealing with attach_count. If the attach_count is...

Latest reviews

I just restored a back of a few forums in one database that has lots of linked images. Convert Image All is saving me a lot of time converting these links to attachments. Thanks mate 5 stars.
Nice work. A little something is on the way from PayPal to show a small fraction of my appreciation for what you've done.
I totally agree with @Movie Prop Sites. We have 20 million posts going back to the year 2000, and this add-on is single-handedly rebuilding our threads by restoring photobucket images. Thanks to AndyB we won't ever have this issue again.
If you don't install any other add-on to your platform... I know that sounds like a cliché but seriously, this is a LIFESAVER, especially in the light of Photobucket's recent policy changes. One of the worst ways in which a forum becomes irrelevant and useless is to have threads with broken images. This add-on ensures you never have broken images again (if they weren't lost already). I wish I had this add-on 10 years ago.
Awesome plugin! I like having posted images local and this does exactly that! You do need decent hosting with the ability to install new modules. Andy helped me and everything is great! Thanks!
What a fantastic idea! One of the biggest problems with forums is that any information involving photos becomes useless if the poster removes the photos from the host or changes the url. Having the images hard wired into the forum will ensure that they stay there for future guests. I can't tell you how many times I click on a forum in searches only to find the information I need, but that it's now useless because the photo is gone.
Great addon and great support, totally recommended. I just changed from MetaMirror addon to this one.
Great addon! :) I have forum since 2006 so I have a lot of broken images. With this modification, I can host images in my VPS and I don't have to worry about the rest of the images .
With the cron-job feature you don't have to do anything. It converts every image itself. Great addon and GREAT support :)
Excellent AddOn that allows Admins to convert all external pictures to local pictures. No more lost pictures or dead links. Awesome support.
Top Bottom