116 reputation
8
bio website
location
age
visits member for 1 year, 8 months
seen Nov 4 at 20:11

Oct
30
awarded  Student
Oct
30
awarded  Commentator
Oct
30
comment Generate image size, based on the image-orientation
@barrycarter add_image_size() is for setting sizes site-wide. At that stage I can’t say, what orientation the image might have. I thought about using add_image_size() to add a new size, before the image generation and remove it afterwards with remove_image_size(), but that feels really hacky. I may have found a solution today. I updated my post with details.
Oct
30
revised Generate image size, based on the image-orientation
Update on my process
Oct
28
comment Generate image size, based on the image-orientation
@barrycarter I would love to do it inside Wordpress as part of the image size functions. There are a lot of benefits in not using external software, but the main parts are: It is easier to maintain and a lot of possible error sources get eliminated by not adding additional steps for the editor. I thought about converting on the fly too, but as you said, this could be very heavy on the server.
Oct
28
comment Generate image size, based on the image-orientation
As for the problem with the 24 images: The site I am talking about is unsing thousands of images. If I generate 24 images for each of them, it would generate a huge amount of files. Especially unneded files, because 16 of them will never be used. It takes a lot of time to process the images and I will have gigabytes of unneeded data stored on the server. This would result in unnecessary costs for hosting.
Oct
28
comment Generate image size, based on the image-orientation
Let’s say the first breakpoint is optimized for mobile devices. The image in this breakpoint has a maximum width of 300px. If the fourth breakboint is optimized for widescreen desktops and the image has a maximum width of 1500px, it would be a huge difference in file size. If I am on the mobile optimized breakpoint, there would be no need to load the 1500px image if it will be displayed with a max-width of 300px. Instead, I would request a 300px version and keep the page load small. It’s simply a matter of file-size.
Oct
28
asked Generate image size, based on the image-orientation
May
19
awarded  Tumbleweed
May
12
asked Get media-uploader fields array
May
11
comment How to store and retrieve the attachment alignment?
The gallery aligns the images left and right one after another. The user should be able to change that and force one image to the left, the right or the center. The user input overwrites the default behavior of my gallery code.
May
11
comment How to store and retrieve the attachment alignment?
It does not really depend on it. I have a default alignment for my gallery, but the user required to change it, if needed. This is not possible at the moment, since I can’t get the users input.
May
11
comment How to store and retrieve the attachment alignment?
I think of it more in a "default display intention"-way. I use all images attached to the post as a gallery. I could set up a custom gallery for each post, but that would add unnecessary steps for the user, as well as I could not hide the editor. (The editor is not necessary because the post is just a gallery with a title)
May
11
asked How to store and retrieve the attachment alignment?
May
11
awarded  Editor
Apr
6
awarded  Scholar
Apr
6
accepted How to let a role handle media without post permissions
Mar
30
awarded  Teacher
Mar
30
comment How to let a role handle media without post permissions
The problem in altering the "post" post-type is, that if I want to use it in addition to the new post-type, altering the original is no option. Creating the post-type never was a problem, I struggled with the permissions. I didn’t want to use plugins, because I am trying to understand how things work in Wordpress. Anyway, I solved it and everything works like it should.
Mar
30
answered How to let a role handle media without post permissions