Image resolution
-
I uploaded an image into an event, but when I show it in calendar, the image is in low resolution.
How can I see it in original resolution?
Thanks
-
The default size of an image shown in My Calendar is ‘medium’. You can add a filter on ‘mc_default_image_size’ to change the size used.
e.g.
add_filter( 'mc_default_image_size', 'my_image_size', 10, 1 ); function my_image_size( $default ) { return 'large'; }Hi,
here my page with the image in low resolution.I’m not expert with wordpress. Can you say to me what file I have to modify?
Where I have to add that filter?After this upgrade MyCalendar will use large image everytime?
this will make heavier page?tnx and sorry for my english
See: https://github.com/joedolson/plugin-extensions/blob/master/my-calendar/mc-custom-image-size.php
Install that file as a plug-in, and you’ll get what you want, as long as you have a large image size available.
I tried to install mc-custom-image-size.php but installation failed.
It says:
the package can not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signatureMaybe I have to do it manually.
Do I have to copy it into the wp-content/plugins/my-calendar folder?I saw some other files in your Github… do I have to install them?
They are:
– mc-facebook.php
– mc-insert-class-in-nav.php
– mc-notify.php
– mc-redirect-single-event-view.php
– mc-time-format.php
– mc-twitter.php
– my-calendar-custom-fields.phpP.S.: I tried to install the unpackaged my-calendar folder with all those files but the same error is showed
The easiest steps to take would be to copy the code from the raw view:
1) save that as a file called ‘mc-custom-image-size.php’.
2) upload the file into /wp-content/plugins/ via FTP
3) activate the plug-in at WordPress > PluginsThere’s no need for any of the other files; these are all individual plug-ins, installable to modify various aspects of my plug-ins.
I put mc-custom-image-size.php into my-calendar folder manually and now it’s showed on plugin panel.
I activated it….but not run!!
Nothing happen, image are not resized in large format.In homepage you can see the event list with thumbnails
Today i tried to change the function mc_image_data( $e, $event ) into my-calendar-templates.php
I found the problem in that part of code
if ( isset( $e['medium'] ) && $e['medium'] != '' ) { $e['image_url'] = strip_tags( $e['medium'] ); $e['image'] = $e['medium']; }Changing the value “medium” to “large” it run….but images size change even on the Home page list. They are connected!!!
How can I change, ONLY, the event post image size?Ok, I fix this issue in this way:
if (is_home()){ if ( isset( $e['medium'] ) && $e['medium'] != '' ) { $e['image_url'] = strip_tags( $e['medium'] ); $e['image'] = $e['medium']; } else { $image_size = apply_filters( 'mc_default_image_size', 'thumbnail' ); $e['image_url'] = strip_tags( $e[$image_size] ); $e['image'] = $e[$image_size]; } } else{ if ( isset( $e['large'] ) && $e['large'] != '' ) { $e['image_url'] = strip_tags( $e['large'] ); $e['image'] = $e['large']; } else { $image_size = apply_filters( 'mc_default_image_size', 'thumbnail' ); $e['image_url'] = strip_tags( $e[$image_size] ); $e['image'] = $e[$image_size]; } }Yes, I know, it’s a bad solution but I don’t know how to fix it in other way.
Now my fear is next MyCalendar upgrade. Surely I lose my changes.
Joe, can you help me?
The topic ‘Image resolution’ is closed to new replies.