Title: Custom Image Size
Last modified: February 9, 2017

---

# Custom Image Size

 *  Resolved [michelia](https://wordpress.org/support/users/michelia/)
 * (@michelia)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/custom-image-size-8/)
 * I have tried to follow your instruction by adding the following codes in function.
   php
 * function change_timeline_express_announcement_image_size( $image_size ) {
    $image_size
   = ‘full’; return $image_size; } add_filter( ‘timeline-express-announcement-img-
   size’ , ‘change_timeline_express_announcement_image_size’ );
 * But then, the image enlarged. What I want is when the image is smaller than the
   designed size, then place it centre and keep the original image size. If the 
   image is larger than the designed size, then scale down according to the width
   and need not crop the height.
 * This is the page:
    [http://www.themichelia.com/about/know-me-more/](http://www.themichelia.com/about/know-me-more/)
 * Thanks!
    -  This topic was modified 9 years, 3 months ago by [michelia](https://wordpress.org/support/users/michelia/).
    -  This topic was modified 9 years, 3 months ago by [michelia](https://wordpress.org/support/users/michelia/).
    -  This topic was modified 9 years, 3 months ago by [michelia](https://wordpress.org/support/users/michelia/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Contributor [Code Parrots](https://wordpress.org/support/users/codeparrots/)
 * (@codeparrots)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/custom-image-size-8/#post-8785899)
 * Hi there [@michelia](https://wordpress.org/support/users/michelia/),
 * You were correct in using the ‘full’ image size, but you’ll also want to adjust
   the image width within the announcement container on the timeline. The width 
   of the image is set to 100% by default, so regardless of the actual thumbnail
   size, the width extends to 100% (This is something we can address in a future
   release, so only the custom timeline express announcement image size is set to
   100% while others remain at the original width.
 * For now, you just need to tweak the width CSS attribute on the image element.
 * Try adding the following to your themes ‘Additional CSS’ section of the customizer
   or within your themes style.css file:
 *     ```
       .cd-timeline-title-container+img {
           width: auto;
           display: block;
           margin: 0 auto;
           margin-bottom: .75em;
           max-width: 100%;
       }
       ```
   
 * Let us know how that works for you.
 *  Thread Starter [michelia](https://wordpress.org/support/users/michelia/)
 * (@michelia)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/custom-image-size-8/#post-8786285)
 * I am not sure if I still need to keep the customized codes in the function.php,
   so I tried both ways. However, it doesn’t take any effect at all.
 * I used “my custom style plugin” and you can see my captured screen ⌊Style⌉
 * [http://www.themichelia.com/style/](http://www.themichelia.com/style/)
 * Thanks!
    -  This reply was modified 9 years, 3 months ago by [michelia](https://wordpress.org/support/users/michelia/).
    -  This reply was modified 9 years, 3 months ago by [michelia](https://wordpress.org/support/users/michelia/).
 *  Plugin Contributor [Code Parrots](https://wordpress.org/support/users/codeparrots/)
 * (@codeparrots)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/custom-image-size-8/#post-8786316)
 * You may have to add !important tags to the end of them, depending on what is 
   going on over on your site.
 * Try the following:
 *     ```
       .cd-timeline-title-container+img {
           width: auto !important;
           display: block !important;
           margin: 0 auto !important;
           margin-bottom: .75em !important;
           max-width: 100% !important;
       }
       ```
   
 *  Thread Starter [michelia](https://wordpress.org/support/users/michelia/)
 * (@michelia)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/custom-image-size-8/#post-8786391)
 * Great!!! It worked perfectly!
 * Thanks a lot!
 *  Plugin Contributor [Code Parrots](https://wordpress.org/support/users/codeparrots/)
 * (@codeparrots)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/custom-image-size-8/#post-8786399)
 * Awesome! No problem at all. Glad we could help out!
 * Have a great rest of your day!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Custom Image Size’ is closed to new replies.

 * ![](https://ps.w.org/timeline-express/assets/icon-256x256.png?rev=1007462)
 * [Timeline Express](https://wordpress.org/plugins/timeline-express/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/timeline-express/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/timeline-express/)
 * [Active Topics](https://wordpress.org/support/plugin/timeline-express/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/timeline-express/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/timeline-express/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Code Parrots](https://wordpress.org/support/users/codeparrots/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/custom-image-size-8/#post-8786399)
 * Status: resolved