Setting Cover Photo Size
-
Hi,
It appears as though, for some reason, you don’t have an image width or height for the cover photo. For those using adaptive image plugins such as Optimole, this means that it doesn’t know what size image to generate and thus results in it generating a very small image that’s ends up looking blurry on the frontend.
I’m in the process on trying to peel away at how this can be accomplished but I’m perplexed. In the function um_get_cover_uri, you get the appropriate image size with height by takkings “attrs” (which isn’t very helpful) and dividing it by the ratio.
Then, in the function um_user when the $data value is “cover_photo” it generates the cover_uri. When I tried:
list( $width, $height, $type, $attr ) = @getimagesize( $cover_uri );
It seems to get called three times, with the last call being the appropriate size and that seems incredibly inefficient.
There has to be a better way to handle this; however, I also see many others post about performance and other issues that it leads me to be seriously concerned about the code quality and test coverage. I *really* want this plugin and would do more with it, but reviewing the code has me deeply concerned about if it’s worth the investment in time and money.
- The topic ‘Setting Cover Photo Size’ is closed to new replies.