Opened 16 years ago
Closed 10 years ago
#8599 closed feature request (duplicate)
Multiple custom image sizes with retroactive image reprocessing
Reported by: | markjaquith | Owned by: | leogermani |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.8.4 |
Component: | Media | Keywords: | needs-testing has-patch dev-feedback |
Focuses: | Cc: |
Description
You should be able to add multiple custom image sizes. And whenever you change or add a size, WordPress should offer to retroactively create images of that size for all your old uploads.
Attachments (8)
Change History (45)
#2
@
16 years ago
- Milestone changed from 2.8 to 2.9
- Type changed from enhancement to feature request
#6
@
15 years ago
- Keywords 2nd-opinion needs-testing added; needs-patch removed
- Version changed from 2.7 to 2.8.4
#7
@
15 years ago
- Keywords has-patch added
In this first patch I implement the posibility to add new custom image sizes to WordPress.
- It was made upon the patch submited on ticket: #10263 (my patch replaces this one)
- It does not "retroactively create images of that size for all your old uploads" yet.
- Ive put some css styles in the elements cause I was not sure where to put them (and there were really few of them)
#10
@
15 years ago
- Cc leogermani added
Good,
I can implement the second half, but I wanted more opinions on how it should work. I dont think it is a good idea to make it regenerate all images automatically on every change, because it is too heavy. Here are the approaches I am considering:
- Have a button "Regenerate images" where the user clicks whenever he wants to regenerate all images thumbs
- Whenever you change the values of a size, a box appears at the top of the screen informing that the changes do not apply to old images, but if (s)he wants to regenerate, 'click here'
In both cases I am thinking to do this trhough ajax so user have a constant feedback on each file beeing processed and is able to cancel the routine.
Opinions?
Leo
#11
@
15 years ago
I think the second option would make more sense.
You have to use some combination of AJAX and possibly wp-cron to prevent timeouts and other limits.
Plugins that use this approach: Intense Debate, WP DB Backup.
Maybe you can work with Viper007Bond to improve the Regenerate Thumbnails plugin and then consider including it in core.
#12
follow-up:
↓ 13
@
15 years ago
The thing with the second option is that if the user dont click on the regenerate button as soon as he changes the values, he misses the chance and have to change the values again if he wants to reprocess the images. Perhaps leaving the 2 actions can be good.
Now one question. If we decide on an ajax approach. How would it work whithout javascript? Do you think it could be a JS-enabled-only feature?
#13
in reply to:
↑ 12
@
15 years ago
Replying to leogermani:
The thing with the second option is that if the user dont click on the regenerate button as soon as he changes the values, he misses the chance and have to change the values again if he wants to reprocess the images. Perhaps leaving the 2 actions can be good.
Agree.
Now one question. If we decide on an ajax approach. How would it work whithout javascript? Do you think it could be a JS-enabled-only feature?
Actually, the AJAX would only be used to update the status without refreshing the page. The crunching would be done in the background anyway. Withot JS, the user would just see a static notice: "Regenerating images: 25% done." or something like that.
#14
@
15 years ago
- Keywords 2nd-opinion removed
A plugin that regenerates the thumbs through AJAX has sprung up:
#15
@
15 years ago
New patch (3). Retroactive image reprocessing
Added the regenerate all thumbnails funcionality
- I did without ajax (at least for the moment). When I finished it I didnt see so much the need for an ajax alternative
- I created a function called wp_update_thumbs - I though it was worth to have it so we can use in other places in the code, such as in the manage media page, I think there could be there a button to regenerate the thumbs for each image. It could be a button for each image and a bulk action
- It patches the new "Edit Image" feature too
#16
@
15 years ago
Patch needs refresh (patch rev: 11953, trunk rev: 12055)
Although I would really like this patch commited, 2.9 is already in feature freeze.
#17
follow-up:
↓ 18
@
15 years ago
I think it's too late for this for 2.9. I have another way I'd like to do it that doesn't involve laborious "rebuilding." I'd like WP's image attachment HTML output functions to check for the existence of a file in a specified size and build it on the fly if it doesn't exist.
#18
in reply to:
↑ 17
;
follow-ups:
↓ 19
↓ 22
@
15 years ago
Replying to markjaquith:
I think it's too late for this for 2.9. I have another way I'd like to do it that doesn't involve laborious "rebuilding." I'd like WP's image attachment HTML output functions to check for the existence of a file in a specified size and build it on the fly if it doesn't exist.
Sort of like TimThumb, right? The only issue would be: how do you get rid of files that aren't used anymore?
#19
in reply to:
↑ 18
@
15 years ago
Replying to scribu:
The only issue would be: how do you get rid of files that aren't used anymore?
Right, a wp-cron job that regularly scans files using fileatime() will do.
#21
@
15 years ago
Discussed on Oct 22nd dev chat. Summary:
- Good idea to improve this area of WordPress
- Not sure about exact details or the reprocessing
- Need to discuss some more exactly what we want here.
#22
in reply to:
↑ 18
;
follow-up:
↓ 23
@
15 years ago
Replying to scribu:
how do you get rid of files that aren't used anymore?
Maybe a better question is why are thumbnails generated even when they are not used?
#23
in reply to:
↑ 22
@
15 years ago
Replying to miqrogroove:
Replying to scribu:
how do you get rid of files that aren't used anymore?
Maybe a better question is why are thumbnails generated even when they are not used?
Because it's slow, complicated, and generally bad to generate them on the fly unless you have a good server.
#24
@
15 years ago
- Cc miqrogroove@… added
I keep forgetting the Media Gallery uses the small thumbnails. Anyway, I see there hasn't been agreement on whether or not to regenerate custom sizes on the fly. Let me just add that when I was working on the thumbnail system for XMB, we determined mass thumbnail regeneration was too CPU intensive to be viable in most environments. At that point we abandoned the idea as being counterproductive.
#25
follow-up:
↓ 26
@
15 years ago
Just to tell that I didnt give up on that.... I want to wait 2.9 release and then update the patch to the last trunk. I dont like the idea of the regenerating proccess beeing in the core too, so I will remove it.
I would really like more people to comment on that... I think this is a very good feature to go into 3.0
Leo
#26
in reply to:
↑ 25
;
follow-up:
↓ 27
@
15 years ago
Replying to leogermani:
I would really like more people to comment on that... I think this is a very good feature to go into 3.0
IMHO, being able to specify the image size in the post editor is the most needed feature. If I upload a 2000 x 2000 image, I'm given only the options defined in image settings. Regardless of how many choices are available, I might want something different. Currently it uses HTML attribute sizing, which is useless to an experienced web author. I'm not sure if that's on-topic though. The feature described by this ticket has more to do with thumbnails for theme changes?
@
15 years ago
screenshot: The Patch in action, add a picture screen shows the new size option for insertion
#27
in reply to:
↑ 26
@
15 years ago
Replying to miqrogroove:
The feature described by this ticket has more to do with thumbnails for theme changes?
Ive attached some screenshots to this ticket to make it easier to understand what this patch is all about.
It allows you to create many custom sizes. When you upload a picture, WP will generate copies of this image in all sizes you configured (if possible).
When you add a picture to a post, you will have the option to insert your sizes.
This patch also fixes ticket #10263
It is not updated to the latest trunk. I nedd to know if its going into 3.0 or not, so I can update the patch
#28
@
15 years ago
- Cc ShaneF added
- Component changed from Upload to Media
- Milestone changed from 3.0 to Future Release
All 'media' based new features are on hold and pushed to 3.1.x. Because of the SOW set for 3.0 this does not fall into that category.
Previous work: http://wordpress.org/extend/plugins/regenerate-thumbnails/