Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching to Django ImageKit #44

Open
petry opened this issue Apr 9, 2013 · 18 comments
Open

Switching to Django ImageKit #44

petry opened this issue Apr 9, 2013 · 18 comments

Comments

@petry
Copy link
Contributor

petry commented Apr 9, 2013

Photologue is a huge app, and i believe if it more easy to mantain if we separate these responsibilities os management and processing. Look I'm not saying to drop this funcionality, I believe we can use them simply by calling the methods that already exist on photologue

There are a lot of packages created especifically to process images:
https://github.com/SmileyChris/easy-thumbnails
https://github.com/jdriscoll/django-imagekit
https://github.com/globocom/thumbor

@richardbarran
Copy link
Owner

It's a good point - in the wiki there's a wishlist for a Photologue 3.0, I had already made a comment about this subject, and I have added your comment about to the wiki.

@petry
Copy link
Contributor Author

petry commented Apr 15, 2013

I've made a Proof of concept of the work on my repository branch:

Resize, color effects, transpose, and watermark works fine

I'm using the beta version of django imagekit:

If everyone agrees, I'll fix some tests, remove others and make a pull request :)

@richardbarran
Copy link
Owner

That's excellent work, I'm impressed.

I think that this is going to be a big change to Photologue. Some of my reasons:

  • users who have defined PhotoSizes other than the standard thumbnail/admin_thumbnail/display are going to have to write some code (they will have to extend the Photo model and add their own custom sizes in code).
  • so Photologue will need tweaking so that Photo can be extended easily (I think django-oscar has a good approach for this).
  • and realistically we will need a release of Photologue that issues a DeprecationWarning, then the next release introduces imagekit.

The above is just one example; I think it's going to be a slow process, with lots of things to update. I've created a new tag specifically for this project, as I think that a lot of tickets will be created.
I've also created a new branch and merged your code; I haven't tested it as I'm assuming that your code works :-)

My thinking is that we should work on this branch, keep it high quality so that people can actually use it on (new) production websites, and slowly get it ready so that other users can upgrade from existing Photologue installations.

I'm going to open a few tickets as I think of more things that will need updating.

If we can get imagekit working and integrated into Photologue it would be brilliant - it would make the app a lot nicer to use.

@richardbarran
Copy link
Owner

Hi Marcos, I've created a new branch and merged your work, I tried to get it working on my computer using the 'example_project' I've recently added to Photologue.
So I checked out the ImageKit repo and added it to sys.path. Then I run a 'manage.py syncbd' I get the error message:

...
  File "/home/coyote/projects/photologue/django-photologue-imagekit/example_project/../photologue/models.py", line 17, in <module>
    from photologue.processors import PhotologueSpec
  File "/home/coyote/projects/photologue/django-photologue-imagekit/example_project/../photologue/processors.py", line 1, in <module>
    from imagekit.registry import register
  File "/home/coyote/projects/photologue/django-imagekit/imagekit/__init__.py", line 2, in <module>
    from . import importers
ImportError: cannot import name importers

I'm using ImageKit branch 'develop', is this correct?

@petry
Copy link
Contributor Author

petry commented Apr 19, 2013

hi @richardbarran!

Did you installed Pil or Pillow?

I caught a problem when I'm using this branch with amazon s3, if you (or anyone) have any kind problem with these branch, please submit an issue in my repository to don't mess this issue list :)

After thursday, I intend spend more time with this feature, re-testing, and refactor the code

any contributions are welcome :)

@petry
Copy link
Contributor Author

petry commented Apr 25, 2013

guys, good news!

I've fixed all tests, and now my fork of django-photologue can create all effects and sizes of images with django-imagekit >= 3.0, also and it`s fully functional with Django 1.4 and 1.5

My branch now works with S3 storages :D

I've added some dependency links on setup.py to my branch works with most updated packages (my fork of pilkit and imagekit)

I don't know if (or when) this repo will use my modifications, but I want keep my fork updated with oficial master branch

@petry
Copy link
Contributor Author

petry commented Jun 11, 2013

just an update:

Now django-photologue with imagekit using official release of django-imagekit and pilkit. Also I've updated this fork with photologue master

@richardbarran
Copy link
Owner

👍

@jonashaag
Copy link
Contributor

Any news on this?

@richardbarran
Copy link
Owner

No updates at the moment Jonas - but if you want to test Petry's branch and report back, the more people who can test it and report back their experiences (positive or negative), the quicker it can be integrated.
The last time that I looked, Petry had made a number of changes in one branch (ImageKit, and several other types of changes also) and I was a bit worried about pulling in all those changes without knowing exactly what was happening. But if those changes can be split into smaller chunks (one subject per pull request) then that would be great.

@rustanacexd
Copy link

+1

@morlandi
Copy link

morlandi commented May 1, 2019

+1 !!!
@richardbarran was this lost ?

@richardbarran
Copy link
Owner

Hi,
Yes, I think so. It would be very beneficial to switch to an external package for the manipulation of photos, but it's a lot of work, and I've never got round to it. So unless if someone is willing to invest a lot of time, I'm afraid things will stay as they are!

@derek-adair
Copy link

This may be lower-hanging fruit than you think. It would mostly be deleting and updating documentation. easy_thumbnail is quite unobtrusive and requires no changes to your models. You can even define image sizes on the fly in your templates.

This is the kind of butchery I enjoy so I will give this a pass some time in the...well... next month or two lol.

@richardbarran
Copy link
Owner

Hi @derek-adair - yes please look into this. It's a change that I would like to have in Photologue, as it would greatly reduce the amount of code and make the project easier to maintain.

@derek-adair
Copy link

Hey everyone! It's been a busy year for me but I finally got around to completing something worth sharing!

Introducing Medialogue. I can't remember why i broke association with photologue but i'd be fine restoring it. It's starting to stabilize and i'd appreciate some eyes on it. Definitely not production ready unless you are fine with me breaking migrations. Hope to get there soon.

Major Changes

Video Support: Using django video encoding
Front end focus: I've completely disregarded the admin UI for the end user. Here are a couple neat features;

  1. Smooth upload experience.
  2. Edit/upload/order media outside of admin UI
  3. Thumbnails with easy_thumbnails

Breaking Changes

  1. Changed Gallery -> Album
  2. I've removed the manyToMany relationship between media/albums. I am now using django-ordered-model and a one to many relationship.

I have no interest/bandwidth to develop a migration from photologue->medialogue; but would welcome a PR

Issue Tracker

Currently i'm not using github in loo of a private trello board. For now i will leave issues open until I decide to migrate or figure out what goes where.

@richardbarran
Copy link
Owner

Nice work!

Photologue will continue - people already use it, and will continue to use it - but it's great to have more options!

@derek-adair
Copy link

derek-adair commented Aug 13, 2022

Thanks! I appreciate your work in giving me a leg up on developing this code.

If you or anyone else wants to use it as inspiration for improvements here I'd be glad to help. The main thing that I think photologue can benefit from is adopting easy_thumbnail. I dont have much bandwidth but that would be a 5 minute PR. It is almost all just deleting code, installing easy_thumbnail and implementing it.

The rest of the stuff really is non-essential highly opinionated changes that dont add that much... but make it easier for me to further my other projects.

Again, thanks for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants