Skip to content

AndyGaskell/joomla_plugin_bigimagefixer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Big Image Fixer - Joomla Plugin

This is a Joomla Plugin to fix big images

https://github.com/AndyGaskell/joomla_plugin_bigimagefixer

This plugin will, on article save, reduce overly large images that may have been added to content. The idea came from a chat with Pete Rosetti at J & Beyond in 2017. It seemed like a simple solution for a problem that comes up somtimes. The problem is that sometimes an inexpeienced CMS user will upload images without resizing them for web use, which can result in very large page sizes. These large images are often not noticed by users due to css limiting image size to 100%, or similar template code. So, in a sense, the plug-in provides a bit of insurance against that happening.

Installing

I'll try and add this to the JED, but for now, best option is to just go to https://github.com/AndyGaskell/joomla_plugin_bigimagefixer/raw/master/dist/bigimagefixer_latest.zip and install it in the normal way. After you've installed it, don't forget to enable it in plug-in manager.

What problems does this solve

  • Article authors keep adding overly large images to content without realising it
  • It'd be good to save time and have all images about the right size
  • Overly large images take up too much space on the server

Design principles

  • After install it should work invisibly
  • It can be added to a site by an admin and will quietly help users with images being appropriate sizes
  • It should not change the article content at all

Options

The plugin has a few options, they are...

  • Maximum width in pixels: The maximum width in pixels is the size, above which, images will be reduced.
  • Maximum height in pixels: The maximum height in pixels is the size, above which, images will be reduced.
  • Backup large image: you want to keep a backup of the large image? It will have th suffix _backup
  • Process JPG files: Process this file type.
  • Process PNG files: Process this file type.
  • Enable debug: This enables quite verbose debug.

Feedback - issues, questions and suggestions

Any ideas, issues or sugestions, please just add an issue in GitHub at https://github.com/AndyGaskell/joomla_plugin_bigimagefixer/issues

Distribution from GitHub

I was wondering if it is possible to distribute and manage a Joomla extention, with updates, listed on the JED, entierly from GitHub. So it's a bit of a proof-of-concept

Tools

  • create-release.sh - This takes the src files and creates a zip
  • git-to-local.sh - copy the git working copy files to a joomla install, the joomla install path is set in the script
  • local-to-git.sh - copy files from a joomla install into the git working copy, the joomla install path is set in the script

Notes and docs

Git cheatsheet

Clone the repo from github to local...

git clone https://github.com/AndyGaskell/joomla_plugin_bigimagefixer.git

Add a file...

git add dist/blah.php

Commit...

git commit -m "updates"

Commit...

git commit -a -m "udates"

Send updates to master...

git push -u origin master

Get updates from master...

git fetch origin

git pull

About

This is a Joomla Plugin to fix big images

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages