Announcement

Collapse
No announcement yet.

Resize images that are already in the Attachment database

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Guest's Avatar
    Guest replied
    I'll do a good old batch file on our Windows server

    Leave a comment:


  • Wayne Luke
    replied
    The link below has a bash script to tar a folder and email it to an address. Set it up on as a crontab job and you're all set.

    http://stackoverflow.com/questions/1...r-and-email-it

    Leave a comment:


  • Guest's Avatar
    Guest replied
    The only thing with file system storage is that you will need to ensure you have a seperate backup of that folder.

    Leave a comment:


  • Wayne Luke
    replied
    vBulletin 5 will resize images as they are used. If you update the sizes listed under Settings -> Options -> Message Attachment Options, it will invalidate existing images and resize them again when they are viewed.

    For storing images, it is really recommended to store them in the file system and not the database. The database storage could be considered legacy and is the default because we don't know the environment where vBulletin is being installed. We also don't know the level of expertise of the person installing the software. File Permissions can be tricky for some people.

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Thanks! I will try this!

    Leave a comment:


  • Replicant
    replied
    If you have command line access, this may work for you.
    Start off by backing up your database just in case.

    Go to admincp > attachments > attachment storage type and move attachments to file system. This will put all your attachments in a directory you chose and several sub-directories. In those directories, you will find files with the extension ".attach" . There is an Image Magick command line program called convert.

    Usage is:
    convert -resize <size option> <input file> <output file>. The size options can be WidthxHeight or percentages or several other options.
    "convert -h" will list your usage options.

    This operation can be done one at a time or batched into a script.

    After you are finished, resizing and renaming back to original names, import back into database and check to see if attachments are still working. If the attachments aren't working, you can always restore your backup.

    Leave a comment:


  • Guest's Avatar
    Guest started a topic Resize images that are already in the Attachment database

    Resize images that are already in the Attachment database

    Hi guys,

    I made a mistake with our resizing rules for uploaded pictures. Resulting in having large JPG files in our database from 3MB or larger.

    Is there a way to process them with GD or ImageMagick after they are uploaded? The only thing I seem to be able to is to delete them

    Thanks!

Related Topics

Collapse

Working...
X